deleteFile function

void deleteFile(
  1. String filePath
)

delete a file

Implementation

void deleteFile(String filePath) {
  final file = File(filePath);
  final exists = file.existsSync();
  if (!exists) return;
  file.deleteSync();
}