unitToString function

String unitToString(
  1. Unit type
)

Implementation

String unitToString(Unit type) {
  if (type == Unit.metric) return 'metric';
  if (type == Unit.imperial) return 'imperial';
  return null;
}