tryFormatFileSizeToStr static method

String? tryFormatFileSizeToStr(
  1. int? fileSize, {
  2. int position = 2,
  3. int scale = 1024,
  4. int specified = -1,
})

Implementation

static String? tryFormatFileSizeToStr(
  int? fileSize, {
  int position = 2,
  int scale = 1024,
  int specified = -1,
}) {
  if (null == fileSize) {
    return null;
  }
  return formatFileSizeToStr(
    fileSize,
    position: position,
    scale: scale,
    specified: specified,
  );
}