mirror of
https://github.com/zarzet/SpotiFLAC-Mobile.git
synced 2026-08-17 16:37:17 +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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user