pull/324/head
haroon amjad 1 month ago
parent f03939b9d0
commit 502fc82c28

@ -1,4 +1,3 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/core/app_assets.dart';

@ -78,7 +78,7 @@ class ImageOptions {
}
},
onFilesTap: () async {
FilePickerResult? result = await FilePicker.pickFiles(
FilePickerResult? result = await FilePicker.platform.pickFiles(
type: FileType.custom,
allowedExtensions: [
'jpg',
@ -94,7 +94,8 @@ class ImageOptions {
'zip',
],
);
List<File> files = result!.paths.map((path) => File(path!)).toList();
if (result == null) return;
List<File> files = result.paths.map((path) => File(path!)).toList();
image(result.files.first.path.toString(), files.first);
},
),

Loading…
Cancel
Save