deleteImage static method
Implementation
static Future<bool> deleteImage(String imgPath) async {
bool result = false;
final imgFile = File(imgPath);
try {
final exist = await imgFile.exists();
if (exist) {
await imgFile.delete();
result = true;
}
} catch (e) {
log('deleteImage error : ${e.toString()}');
}
return result;
}