Support jpeg

main_design2.0
zaid_daoud 2 years ago
parent 90fe4e76b7
commit 2761edf17d

@ -147,7 +147,7 @@ class _MultiFilesPickerState extends State<MultiFilesPicker> with TickerProvider
FilePickerResult result = await FilePicker.platform.pickFiles( FilePickerResult result = await FilePicker.platform.pickFiles(
type: FileType.custom, type: FileType.custom,
allowMultiple: true, allowMultiple: true,
allowedExtensions: ['jpg', 'png', 'pdf', 'doc', 'docx', 'xlsx', 'pptx'], allowedExtensions: ['jpg', 'jpeg', 'png', 'pdf', 'doc', 'docx', 'xlsx', 'pptx'],
); );
if (result != null) { if (result != null) {
for (var path in result.paths) { for (var path in result.paths) {

@ -13,7 +13,7 @@ class MultiFilesPickerItem extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
var isImage = file.path.split(".").last.toLowerCase() == "png" || file.path.split(".").last.toLowerCase() == "jpg"; var isImage = file.path.split(".").last.toLowerCase() == "png" || file.path.split(".").last.toLowerCase() == "jpg" || file.path.split(".").last.toLowerCase() == "jpeg";
var isPdf = file.path.split(".").last.toLowerCase() == "pdf"; var isPdf = file.path.split(".").last.toLowerCase() == "pdf";
var isExcel = file.path.split(".").last.toLowerCase() == "xlsx"; var isExcel = file.path.split(".").last.toLowerCase() == "xlsx";
return Container( return Container(

Loading…
Cancel
Save