fix(deps): keep file_picker on 12.x beta to stay win32 6 compatible

file_picker has no stable release compatible with win32 ^6.x (required by device_info_plus/share_plus/connectivity_plus). Its Windows FFI code is compiled even for Android builds, so a win32 override breaks compilation. Revert file_picker to 12.0.0-beta and restore the original pickFile usage. Other Flutter/Go dependency updates remain on latest stable.
This commit is contained in:
zarzet
2026-06-26 21:33:13 +07:00
parent f0acda0f01
commit e64bea41e6
5 changed files with 11 additions and 24 deletions
+2 -3
View File
@@ -361,9 +361,8 @@ class LibraryPlaylistsScreen extends ConsumerWidget {
WidgetRef ref,
String playlistId,
) async {
final result = await FilePicker.pickFiles(type: FileType.image);
if (result == null || result.files.isEmpty) return;
final picked = result.files.first;
final picked = await FilePicker.pickFile(type: FileType.image);
if (picked == null) return;
final path = picked.path;
if (path == null || path.isEmpty) return;
@@ -571,9 +571,8 @@ class _LibraryTracksFolderScreenState
final playlistId = widget.playlistId;
if (playlistId == null) return;
final result = await FilePicker.pickFiles(type: FileType.image);
if (result == null || result.files.isEmpty) return;
final picked = result.files.first;
final picked = await FilePicker.pickFile(type: FileType.image);
if (picked == null) return;
final path = picked.path;
if (path == null || path.isEmpty) return;
+3 -7
View File
@@ -201,19 +201,15 @@ class _EditMetadataSheetState extends State<_EditMetadataSheet> {
Future<void> _pickCoverImage() async {
try {
final result = await FilePicker.pickFiles(
type: FileType.image,
withData: true,
);
if (result == null || result.files.isEmpty) return;
final picked = result.files.first;
final picked = await FilePicker.pickFile(type: FileType.image);
if (picked == null) return;
final sourcePath = picked.path;
Uint8List? bytes;
final needsByteFallback =
!_hasValue(sourcePath) && !_hasValue(picked.extension);
if (needsByteFallback) {
bytes = picked.bytes;
bytes = await picked.readAsBytes();
}
final extension = _resolveImageExtension(picked.extension, bytes);
+3 -3
View File
@@ -349,10 +349,10 @@ packages:
dependency: "direct main"
description:
name: file_picker
sha256: f13a03000d942e476bc1ff0a736d2e9de711d2f89a95cd4c1d88f861c3348387
sha256: fdc6a37f715d19f35b131decf1ce39242eeed5ddae18c0818c3eccb731ab76be
url: "https://pub.dev"
source: hosted
version: "11.0.2"
version: "12.0.0-beta.7"
fixnum:
dependency: transitive
description:
@@ -1411,7 +1411,7 @@ packages:
source: hosted
version: "1.2.1"
win32:
dependency: "direct overridden"
dependency: transitive
description:
name: win32
sha256: ba6f4bba816c8d7e3c1580e170f3786d216951cc6b94babc3b814c08d2cb2738
+1 -8
View File
@@ -43,7 +43,7 @@ dependencies:
permission_handler: ^12.0.3
# File Picker
file_picker: ^11.0.2
file_picker: ^12.0.0-beta.5
# JSON Serialization
json_annotation: ^4.12.0
@@ -72,13 +72,6 @@ dev_dependencies:
json_serializable: ^6.14.0
flutter_launcher_icons: ^0.14.3
# file_picker (stable 11.x) pins win32 ^5.9.0, while device_info_plus and
# other *_plus plugins require win32 ^6.x. win32 is a Windows-desktop-only
# transitive dependency and is never compiled for the Android/iOS targets, so
# we override it to satisfy resolution without affecting mobile builds.
dependency_overrides:
win32: ^6.0.1
flutter_launcher_icons:
android: true
ios: true