deleteFile static method
删除文件
Implementation
static Future<bool> deleteFile(String? filePath) async {
if (filePath == null) {
return false;
}
try {
final file = File(filePath);
if (file.existsSync()) {
file.delete();
}
return true;
} catch (err) {
return false;
}
}