getFileLength static method

int getFileLength(
  1. String filePath
)

Implementation

static int getFileLength(String filePath) {
  final file = File(filePath);
  if (file.existsSync()) {
    return file.lengthSync();
  }
  return 0;
}