This commit is contained in:
Alessandro Autiero
2022-12-16 21:08:57 +01:00
parent ef7f34e0e3
commit 966b4b33fd
91 changed files with 388682 additions and 1005 deletions

View File

@@ -0,0 +1,17 @@
import 'package:file_picker/file_picker.dart';
Future<String?> openFolderPicker(String title) async =>
await FilePicker.platform.getDirectoryPath(dialogTitle: title);
Future<String?> openFilePicker(String extension) async {
var result = await FilePicker.platform.pickFiles(
type: FileType.custom,
allowMultiple: false,
allowedExtensions: [extension]
);
if(result == null || result.files.isEmpty){
return null;
}
return result.files.first.path;
}