getFileSize method

String? getFileSize({
  1. required File file,
})

this function return size of any file in flutter

Implementation

String? getFileSize({required File file}) {
  print(file.lengthSync());
  return "${FileSize().getSize(file.lengthSync())}";
}