toDistanceUnit method

DistanceUnit toDistanceUnit(
  1. int graduation
)

Implementation

DistanceUnit toDistanceUnit(int graduation) {
  switch (this) {
    case MeasureSystem.metric:
      return 1.cm;
    case MeasureSystem.imperial:
      return 1.inch(graduation);
  }
}