diff --git a/CHANGELOG.md b/CHANGELOG.md index 01c9cb0..08da5d9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file. ## [Unreleased] +### 📦 Dependencies +- **file_picker**: Upgrade from `^10.3.10` to `^11.0.2` — migrates to static API (`FilePicker.platform` removed). Includes Android path traversal security fix (CWE-22) and WASM web support + ## [1.0.0-alpha.10] - 2026-04-07 ### ✨ New Features diff --git a/example/pubspec.lock b/example/pubspec.lock index 70a9eb0..78a6952 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -165,10 +165,10 @@ packages: dependency: transitive description: name: file_picker - sha256: "57d9a1dd5063f85fa3107fb42d1faffda52fdc948cefd5fe5ea85267a5fc7343" + sha256: f13a03000d942e476bc1ff0a736d2e9de711d2f89a95cd4c1d88f861c3348387 url: "https://pub.dev" source: hosted - version: "10.3.10" + version: "11.0.2" file_selector_linux: dependency: transitive description: @@ -507,7 +507,7 @@ packages: path: ".." relative: true source: path - version: "1.0.0-alpha.9" + version: "1.0.0-alpha.10" magic_cli: dependency: transitive description: diff --git a/lib/src/facades/pick.dart b/lib/src/facades/pick.dart index 10aa295..3377e41 100644 --- a/lib/src/facades/pick.dart +++ b/lib/src/facades/pick.dart @@ -294,7 +294,7 @@ class Pick { List? extensions, bool withData = true, }) async { - final result = await FilePicker.platform.pickFiles( + final result = await FilePicker.pickFiles( type: extensions != null ? FileType.custom : FileType.any, allowedExtensions: extensions, withData: withData, @@ -317,7 +317,7 @@ class Pick { List? extensions, bool withData = true, }) async { - final result = await FilePicker.platform.pickFiles( + final result = await FilePicker.pickFiles( allowMultiple: true, type: extensions != null ? FileType.custom : FileType.any, allowedExtensions: extensions, @@ -340,7 +340,7 @@ class Pick { /// } /// ``` static Future directory() async { - return FilePicker.platform.getDirectoryPath(); + return FilePicker.getDirectoryPath(); } /// Open a save file dialog. @@ -363,7 +363,7 @@ class Pick { String? fileName, Uint8List? bytes, }) async { - return FilePicker.platform.saveFile( + return FilePicker.saveFile( dialogTitle: dialogTitle, fileName: fileName, bytes: bytes, diff --git a/pubspec.yaml b/pubspec.yaml index 21f4dc7..01c595f 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -44,7 +44,7 @@ dependencies: timezone: ^0.11.0 url_launcher: ^6.3.0 logger: ^2.6.2 - file_picker: ^10.3.10 + file_picker: ^11.0.2 image_picker: ^1.1.2 faker: ^2.2.0 web_socket_channel: ^3.0.0