isFile static method

bool isFile(
  1. String filePath
)

Implementation

static bool isFile(String filePath) {
  final file = File(filePath);
  return file.existsSync() && file.statSync().type == FileSystemEntityType.file;
}