deleteFile method

Future<void> deleteFile(
  1. String path
)

Implementation

Future<void> deleteFile(String path) async {
  // if (await canManageStorage() == false) {
  //   throw Exception("Permission not granted");
  // }
  File file = File(path);
  if (file.existsSync()) {
    file.deleteSync();
  } else {
    debugPrint("File not found");
  }
}