mirror of
https://github.com/zarzet/SpotiFLAC-Mobile.git
synced 2026-07-02 19:05:57 +02:00
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:
@@ -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;
|
||||
|
||||
@@ -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
@@ -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
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user