|  |  |  | @ -45,7 +45,19 @@ class ImageOptions { | 
		
	
		
			
				|  |  |  |  |         onFilesTap: () async { | 
		
	
		
			
				|  |  |  |  |           FilePickerResult? result = await FilePicker.platform.pickFiles( | 
		
	
		
			
				|  |  |  |  |             type: FileType.custom, | 
		
	
		
			
				|  |  |  |  |             allowedExtensions: ['jpg', 'jpeg ', 'pdf', 'txt', 'docx', 'doc', 'pptx', 'xlsx', 'png', 'rar', 'zip',], | 
		
	
		
			
				|  |  |  |  |             allowedExtensions: [ | 
		
	
		
			
				|  |  |  |  |               'jpg', | 
		
	
		
			
				|  |  |  |  |               'jpeg ', | 
		
	
		
			
				|  |  |  |  |               'pdf', | 
		
	
		
			
				|  |  |  |  |               'txt', | 
		
	
		
			
				|  |  |  |  |               'docx', | 
		
	
		
			
				|  |  |  |  |               'doc', | 
		
	
		
			
				|  |  |  |  |               'pptx', | 
		
	
		
			
				|  |  |  |  |               'xlsx', | 
		
	
		
			
				|  |  |  |  |               'png', | 
		
	
		
			
				|  |  |  |  |               'rar', | 
		
	
		
			
				|  |  |  |  |               'zip', | 
		
	
		
			
				|  |  |  |  |             ], | 
		
	
		
			
				|  |  |  |  |           ); | 
		
	
		
			
				|  |  |  |  |           List<File> files = result!.paths.map((path) => File(path!)).toList(); | 
		
	
		
			
				|  |  |  |  |           image(result.files.first.path.toString(), files.first); | 
		
	
	
		
			
				
					|  |  |  | @ -54,67 +66,68 @@ class ImageOptions { | 
		
	
		
			
				|  |  |  |  |     ); | 
		
	
		
			
				|  |  |  |  |   } | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |   static void showImageOptions(BuildContext context, Function(String, File) image) { | 
		
	
		
			
				|  |  |  |  |     showModalBottomSheet( | 
		
	
		
			
				|  |  |  |  |         backgroundColor: Colors.transparent, | 
		
	
		
			
				|  |  |  |  |         context: context, | 
		
	
		
			
				|  |  |  |  |         builder: (BuildContext bc) { | 
		
	
		
			
				|  |  |  |  |           return _BottomSheet( | 
		
	
		
			
				|  |  |  |  |             children: <Widget>[ | 
		
	
		
			
				|  |  |  |  |               _BottomSheetItem( | 
		
	
		
			
				|  |  |  |  |                 title: "Select File Source", | 
		
	
		
			
				|  |  |  |  |                 onTap: () {}, | 
		
	
		
			
				|  |  |  |  |                 icon: Icons.file_present, | 
		
	
		
			
				|  |  |  |  |                 color: MyColors.black, | 
		
	
		
			
				|  |  |  |  |               ), | 
		
	
		
			
				|  |  |  |  |               _BottomSheetItem( | 
		
	
		
			
				|  |  |  |  |                 title: "Gallery", | 
		
	
		
			
				|  |  |  |  |                 icon: Icons.image, | 
		
	
		
			
				|  |  |  |  |                 onTap: () async { | 
		
	
		
			
				|  |  |  |  |                   if (Platform.isAndroid) { | 
		
	
		
			
				|  |  |  |  |                     galleryImageAndroid(image); | 
		
	
		
			
				|  |  |  |  |                   } else { | 
		
	
		
			
				|  |  |  |  |                     File _image = File((await ImagePicker.platform.pickImage(source: ImageSource.gallery, imageQuality: 10))?.path ?? ""); | 
		
	
		
			
				|  |  |  |  |                     String fileName = _image.path; | 
		
	
		
			
				|  |  |  |  |                     var bytes = File(fileName).readAsBytesSync(); | 
		
	
		
			
				|  |  |  |  |                     String base64Encode = base64.encode(bytes); | 
		
	
		
			
				|  |  |  |  |                     if (base64Encode != null) { | 
		
	
		
			
				|  |  |  |  |                       image(base64Encode, _image); | 
		
	
		
			
				|  |  |  |  |                     } | 
		
	
		
			
				|  |  |  |  |                   } | 
		
	
		
			
				|  |  |  |  |                 }, | 
		
	
		
			
				|  |  |  |  |               ), | 
		
	
		
			
				|  |  |  |  |               _BottomSheetItem( | 
		
	
		
			
				|  |  |  |  |                 title: "Camera", | 
		
	
		
			
				|  |  |  |  |                 icon: Icons.camera_alt, | 
		
	
		
			
				|  |  |  |  |                 onTap: () async { | 
		
	
		
			
				|  |  |  |  |                   if (Platform.isAndroid) { | 
		
	
		
			
				|  |  |  |  |                     cameraImageAndroid(image); | 
		
	
		
			
				|  |  |  |  |                   } else { | 
		
	
		
			
				|  |  |  |  |                     File _image = File((await ImagePicker.platform.pickImage(source: ImageSource.camera, imageQuality: 10))?.path ?? ""); | 
		
	
		
			
				|  |  |  |  |                     String fileName = _image.path; | 
		
	
		
			
				|  |  |  |  |                     var bytes = File(fileName).readAsBytesSync(); | 
		
	
		
			
				|  |  |  |  |                     String base64Encode = base64.encode(bytes); | 
		
	
		
			
				|  |  |  |  |                     if (base64Encode != null) { | 
		
	
		
			
				|  |  |  |  |                       image(base64Encode, _image); | 
		
	
		
			
				|  |  |  |  |                     } | 
		
	
		
			
				|  |  |  |  |                   } | 
		
	
		
			
				|  |  |  |  |                 }, | 
		
	
		
			
				|  |  |  |  |               ), | 
		
	
		
			
				|  |  |  |  |               _BottomSheetItem( | 
		
	
		
			
				|  |  |  |  |                 title: "Cancel", | 
		
	
		
			
				|  |  |  |  |                 onTap: () {}, | 
		
	
		
			
				|  |  |  |  |                 icon: Icons.cancel, | 
		
	
		
			
				|  |  |  |  |                 color: MyColors.redColor, | 
		
	
		
			
				|  |  |  |  |               ) | 
		
	
		
			
				|  |  |  |  |             ], | 
		
	
		
			
				|  |  |  |  |           ); | 
		
	
		
			
				|  |  |  |  |         }); | 
		
	
		
			
				|  |  |  |  |   } | 
		
	
		
			
				|  |  |  |  | // static void showImageOptions(BuildContext context, Function(String, File) image) { | 
		
	
		
			
				|  |  |  |  | //   showModalBottomSheet( | 
		
	
		
			
				|  |  |  |  | //       backgroundColor: Colors.transparent, | 
		
	
		
			
				|  |  |  |  | //       context: context, | 
		
	
		
			
				|  |  |  |  | //       builder: (BuildContext bc) { | 
		
	
		
			
				|  |  |  |  | //         return _BottomSheet( | 
		
	
		
			
				|  |  |  |  | //           children: <Widget>[ | 
		
	
		
			
				|  |  |  |  | //             _BottomSheetItem( | 
		
	
		
			
				|  |  |  |  | //               title: "Select File Source", | 
		
	
		
			
				|  |  |  |  | //               onTap: () {}, | 
		
	
		
			
				|  |  |  |  | //               icon: Icons.file_present, | 
		
	
		
			
				|  |  |  |  | //               color: MyColors.black, | 
		
	
		
			
				|  |  |  |  | //             ), | 
		
	
		
			
				|  |  |  |  | //             _BottomSheetItem( | 
		
	
		
			
				|  |  |  |  | //               title: "Gallery", | 
		
	
		
			
				|  |  |  |  | //               icon: Icons.image, | 
		
	
		
			
				|  |  |  |  | //               onTap: () async { | 
		
	
		
			
				|  |  |  |  | //                 if (Platform.isAndroid) { | 
		
	
		
			
				|  |  |  |  | //                   galleryImageAndroid(image); | 
		
	
		
			
				|  |  |  |  | //                 } else { | 
		
	
		
			
				|  |  |  |  | //                   File _image = File((await ImagePicker.platform.pickImage(source: ImageSource.gallery, imageQuality: 10))?.path ?? ""); | 
		
	
		
			
				|  |  |  |  | //                   String fileName = _image.path; | 
		
	
		
			
				|  |  |  |  | //                   var bytes = File(fileName).readAsBytesSync(); | 
		
	
		
			
				|  |  |  |  | //                   String base64Encode = base64.encode(bytes); | 
		
	
		
			
				|  |  |  |  | //                   if (base64Encode != null) { | 
		
	
		
			
				|  |  |  |  | //                     image(base64Encode, _image); | 
		
	
		
			
				|  |  |  |  | //                   } | 
		
	
		
			
				|  |  |  |  | //                 } | 
		
	
		
			
				|  |  |  |  | //               }, | 
		
	
		
			
				|  |  |  |  | //             ), | 
		
	
		
			
				|  |  |  |  | //             _BottomSheetItem( | 
		
	
		
			
				|  |  |  |  | //               title: "Camera", | 
		
	
		
			
				|  |  |  |  | //               icon: Icons.camera_alt, | 
		
	
		
			
				|  |  |  |  | //               onTap: () async { | 
		
	
		
			
				|  |  |  |  | //                 if (Platform.isAndroid) { | 
		
	
		
			
				|  |  |  |  | //                   cameraImageAndroid(image); | 
		
	
		
			
				|  |  |  |  | //                 } else { | 
		
	
		
			
				|  |  |  |  | //                   File _image = File((await ImagePicker.platform.pickImage(source: ImageSource.camera, imageQuality: 10))?.path ?? ""); | 
		
	
		
			
				|  |  |  |  | //                   String fileName = _image.path; | 
		
	
		
			
				|  |  |  |  | //                   var bytes = File(fileName).readAsBytesSync(); | 
		
	
		
			
				|  |  |  |  | //                   String base64Encode = base64.encode(bytes); | 
		
	
		
			
				|  |  |  |  | //                   if (base64Encode != null) { | 
		
	
		
			
				|  |  |  |  | //                     image(base64Encode, _image); | 
		
	
		
			
				|  |  |  |  | //                   } | 
		
	
		
			
				|  |  |  |  | //                 } | 
		
	
		
			
				|  |  |  |  | //               }, | 
		
	
		
			
				|  |  |  |  | //             ), | 
		
	
		
			
				|  |  |  |  | //             _BottomSheetItem( | 
		
	
		
			
				|  |  |  |  | //               title: "Cancel", | 
		
	
		
			
				|  |  |  |  | //               onTap: () {}, | 
		
	
		
			
				|  |  |  |  | //               icon: Icons.cancel, | 
		
	
		
			
				|  |  |  |  | //               color: MyColors.redColor, | 
		
	
		
			
				|  |  |  |  | //             ) | 
		
	
		
			
				|  |  |  |  | //           ], | 
		
	
		
			
				|  |  |  |  | //         ); | 
		
	
		
			
				|  |  |  |  | //       }); | 
		
	
		
			
				|  |  |  |  | // } | 
		
	
		
			
				|  |  |  |  | } | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  | void galleryImageAndroid(Function(String, File) image) async { | 
		
	
		
			
				|  |  |  |  |   File _image = File((await ImagePicker.platform.pickImage(source: ImageSource.gallery, imageQuality: 20))?.path ?? ""); | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |   String fileName = _image.path; | 
		
	
		
			
				|  |  |  |  |   var bytes = File(fileName).readAsBytesSync(); | 
		
	
		
			
				|  |  |  |  |   String base64Encode = base64.encode(bytes); | 
		
	
	
		
			
				
					|  |  |  | 
 |