convertLengthToMb method

double convertLengthToMb(
  1. int length,
  2. bool roundNum
)

Used to return a converted value from file length.

Implementation

double convertLengthToMb(int length, bool roundNum) {
  var num = roundNum == true ? 100 : 10;
  double firstConvert = length / 1000;
  return (firstConvert / 1000 * num).roundToDouble() / num;
}