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

sender_size
Sarah Jamie Lewis 1 year ago
parent 748326e13f
commit def222a8ab

@ -400,10 +400,11 @@ class _MessageViewState extends State<MessageView> {
// while awaiting for pickFiles.
var appstate = Provider.of<AppState>(ctx, listen: false);
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;
if (result != null) {
File file = File(result.files.first.path);
if (result != null && result.files.first.path != null) {
File file = File(result.files.first.path!);
// 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)
if (file.lengthSync() <= 10737418240) {

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

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

Loading…
Cancel
Save