isMediaExists method

Future<bool> isMediaExists(
  1. String filePath
)

Implementation

Future<bool> isMediaExists(String filePath) async {
  io.File file = io.File(filePath);
  var fileExists = file.absolute.existsSync();
  debugPrint("file exists---> ${fileExists.toString()}");
  var fileExists1 = File(filePath).existsSync() ||
      Directory(filePath).existsSync() ||
      Link(filePath).existsSync();
  debugPrint("file exists1---> ${fileExists1.toString()}");
  return await io.File(filePath).absolute.exists();
}