|
|
|
@ -1,3 +1,4 @@
|
|
|
|
|
import 'package:fluffychat/widgets/future_loading_dialog.dart';
|
|
|
|
|
import 'package:flutter/widgets.dart';
|
|
|
|
|
|
|
|
|
|
import 'package:file_picker/file_picker.dart';
|
|
|
|
@ -14,14 +15,17 @@ Future<List<XFile>> selectFiles(
|
|
|
|
|
}) async {
|
|
|
|
|
if (!PlatformInfos.isLinux) {
|
|
|
|
|
final result = await AppLock.of(context).pauseWhile(
|
|
|
|
|
FilePicker.platform.pickFiles(
|
|
|
|
|
showFutureLoadingDialog(
|
|
|
|
|
context: context,
|
|
|
|
|
future: () => FilePicker.platform.pickFiles(
|
|
|
|
|
compressionQuality: 0,
|
|
|
|
|
allowMultiple: allowMultiple,
|
|
|
|
|
type: type.filePickerType,
|
|
|
|
|
allowedExtensions: type.extensions,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
return result?.xFiles ?? [];
|
|
|
|
|
return result.result?.xFiles ?? [];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (allowMultiple) {
|
|
|
|
|