Line data Source code
1 : // Copyright 2023 The terCAD team. All rights reserved.
2 : // Use of this source code is governed by a CC BY-NC-ND 4.0 license that can be found in the LICENSE file.
3 :
4 : import 'package:app_finance/_classes/herald/app_locale.dart';
5 : import 'package:file_picker/file_picker.dart';
6 : import 'package:flutter/foundation.dart';
7 :
8 : mixin FileExportMixin {
9 0 : Future<void> exportFile(List<int> codeUnits, String filename) async {
10 0 : await FilePicker.saveFile(
11 0 : dialogTitle: AppLocale.labels.outputFile,
12 : fileName: filename,
13 0 : bytes: Uint8List.fromList(codeUnits),
14 : );
15 : }
16 : }
|