pickImageFromGallery method
pick an image from the gallery and forward it through handleImageSelect
Implementation
Future<void> pickImageFromGallery() async {
final granted = await permissionService.requestGallery();
if (!granted) {
handleImageSelect(null);
return;
}
final result = await ImagePicker().pickImage(
imageQuality: imageQuality,
maxWidth: imageMaxWidth,
source: ImageSource.gallery,
);
handleImageSelect(_imageMessageFromPath(result?.path));
}