getFilesSize static method

Future<String> getFilesSize(
  1. ScanModel model
)

Implementation

static Future<String> getFilesSize(ScanModel model) async {
  File? file = await findFile(model);
  if (file != null) {
    int size = file.lengthSync();
    String sizeStr =
        UnitsDataTool.getFileSizeString(bytes: size, decimals: 2);
    return sizeStr;
  } else {
    return "0mb";
  }
}