getFileSize static method

Future<int> getFileSize(
  1. File file
)

Converts the file size from Bytes to Kilobytes

Implementation

static Future<int> getFileSize(File file) async {
  final int bytes = file.lengthSync();
  return bytes ~/ 1024;
}