Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions lib/main_menu/projects/new_project_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,9 @@ class NewProjectDialogState extends ConsumerState<NewProjectDialog> {
padding: const EdgeInsets.only(top: 24, left: 8),
child: ElevatedButton.icon(
onPressed: () async {
final String? picked = await FilePicker.platform
.getDirectoryPath(dialogTitle: "Pick project location");
final String? picked = await FilePicker.getDirectoryPath(
dialogTitle: "Pick project location",
);
if (picked == null) return;

setState(() {
Expand Down
2 changes: 1 addition & 1 deletion lib/main_menu/settings/java/java_picker.dart
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ class _JavaPickerState extends ConsumerState<JavaPicker> {
}

Future<void> onCustom() async {
final FilePickerResult? browsed = await FilePicker.platform.pickFiles(
final FilePickerResult? browsed = await FilePicker.pickFiles(
dialogTitle: "Select Java executable",
// Specifically mention this, because we can't use FileType.custom, which would be expected here.
// This is because it doesn't support files with no extension, which is the case for executables on linux.
Expand Down
4 changes: 2 additions & 2 deletions lib/project_view/configs/views/base.dart
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ class PathPickerButton extends StatelessWidget {
// - Linux will crash on this, if the path contains any special characters
// (I have submitted a PR to the file_picker library that will fix this: https://github.com/miguelpruivo/flutter_file_picker/pull/1963 )
// - Windows will crash on this, if the directory does not exist
picked = await FilePicker.platform.getDirectoryPath(
picked = await FilePicker.getDirectoryPath(
dialogTitle: dialogTitle,
initialDirectory: initialDirectory,
);
Expand All @@ -124,7 +124,7 @@ class PathPickerButton extends StatelessWidget {
// ignore: avoid_catches_without_on_clauses
} catch (_) {
// So if it crashed, we try again, but without an initialDirectory:
picked = await FilePicker.platform.getDirectoryPath(
picked = await FilePicker.getDirectoryPath(
dialogTitle: dialogTitle,
);
}
Expand Down
4 changes: 2 additions & 2 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -309,10 +309,10 @@ packages:
dependency: "direct main"
description:
name: file_picker
sha256: "57d9a1dd5063f85fa3107fb42d1faffda52fdc948cefd5fe5ea85267a5fc7343"
sha256: f13a03000d942e476bc1ff0a736d2e9de711d2f89a95cd4c1d88f861c3348387
url: "https://pub.dev"
source: hosted
version: "10.3.10"
version: "11.0.2"
fixnum:
dependency: transitive
description:
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ dependencies:
archive: ^4.0.9
async: ^2.13.1
crypto: ^3.0.7
file_picker: ^10.3.10
file_picker: ^11.0.2
flutter:
sdk: flutter
flutter_colorpicker: ^1.1.0
Expand Down