deleteFile static method
Delete a file at absolutePath. Returns true on success.
Implementation
static Future<bool> deleteFile(String absolutePath) async {
if (kIsWeb) return false;
try {
final file = File(absolutePath);
if (await file.exists()) {
await file.delete();
return true;
}
return false;
} catch (_) {
return false;
}
}