onSelectMedia method
dynamic
onSelectMedia()
Implementation
onSelectMedia() async {
try {
final selectedFile = await _picker.pickImage(source: ImageSource.gallery);
if (selectedFile != null) {
uploadPhoteChat(selectedFile);
}
} catch (error) {
if (kDebugMode) {
print("error selecting image from gallery ==> $error");
}
}
}