upgrade flutter file picker
continuous-integration/drone/pr Build is passing Details

This commit is contained in:
Sarah Jamie Lewis 2022-01-21 13:40:23 -08:00
parent 748326e13f
commit def222a8ab
3 changed files with 7 additions and 6 deletions

View File

@ -400,10 +400,11 @@ class _MessageViewState extends State<MessageView> {
// while awaiting for pickFiles. // while awaiting for pickFiles.
var appstate = Provider.of<AppState>(ctx, listen: false); var appstate = Provider.of<AppState>(ctx, listen: false);
appstate.disableFilePicker = true; appstate.disableFilePicker = true;
FilePickerResult? result = await FilePicker.platform.pickFiles(); // currently lockParentWindow only works on Windows...
FilePickerResult? result = await FilePicker.platform.pickFiles(lockParentWindow: true);
appstate.disableFilePicker = false; appstate.disableFilePicker = false;
if (result != null) { if (result != null && result.files.first.path != null) {
File file = File(result.files.first.path); File file = File(result.files.first.path!);
// We have a maximum number of bytes we can represent in terms of // We have a maximum number of bytes we can represent in terms of
// a manifest (see : https://git.openprivacy.ca/cwtch.im/cwtch/src/branch/master/protocol/files/manifest.go#L25) // a manifest (see : https://git.openprivacy.ca/cwtch.im/cwtch/src/branch/master/protocol/files/manifest.go#L25)
if (file.lengthSync() <= 10737418240) { if (file.lengthSync() <= 10737418240) {

View File

@ -112,14 +112,14 @@ packages:
name: file_picker name: file_picker
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "4.0.1" version: "4.3.2"
file_picker_desktop: file_picker_desktop:
dependency: "direct main" dependency: "direct main"
description: description:
name: file_picker_desktop name: file_picker_desktop
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.1.0" version: "1.1.1"
flutter: flutter:
dependency: "direct main" dependency: "direct main"
description: flutter description: flutter

View File

@ -41,7 +41,7 @@ dependencies:
flutter_test: flutter_test:
sdk: flutter sdk: flutter
scrollable_positioned_list: ^0.2.0-nullsafety.0 scrollable_positioned_list: ^0.2.0-nullsafety.0
file_picker: ^4.0.1 file_picker: ^4.3.2
file_picker_desktop: ^1.1.0 file_picker_desktop: ^1.1.0
url_launcher: ^6.0.12 url_launcher: ^6.0.12