|
|
|
|
@ -143,7 +143,7 @@ class _MultiFilesPickerState extends State<MultiFilesPicker> with TickerProvider
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
onFilePicker(Subtitle subtitle) async {
|
|
|
|
|
fromFilePicker(Subtitle subtitle) async {
|
|
|
|
|
FilePickerResult result = await FilePicker.platform.pickFiles(
|
|
|
|
|
type: FileType.custom,
|
|
|
|
|
allowMultiple: true,
|
|
|
|
|
@ -157,7 +157,7 @@ class _MultiFilesPickerState extends State<MultiFilesPicker> with TickerProvider
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
onImagePick(Subtitle subtitle) async {
|
|
|
|
|
onFilePicker(Subtitle subtitle) async {
|
|
|
|
|
if (widget.files.length >= 5) {
|
|
|
|
|
Fluttertoast.showToast(msg: subtitle.maxImagesNumberIs5);
|
|
|
|
|
return;
|
|
|
|
|
@ -178,8 +178,16 @@ class _MultiFilesPickerState extends State<MultiFilesPicker> with TickerProvider
|
|
|
|
|
Navigator.of(dialogContext).pop(ImageSource.gallery);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
TextButton(
|
|
|
|
|
child: Text(subtitle.pickFromFiles),
|
|
|
|
|
onPressed: () async {
|
|
|
|
|
await fromFilePicker(subtitle);
|
|
|
|
|
Navigator.pop(context);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
));
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
if (source == null) return;
|
|
|
|
|
|
|
|
|
|
final pickedFile = await ImagePicker().pickImage(source: source, imageQuality: 70, maxWidth: 800, maxHeight: 800);
|
|
|
|
|
|