getUnit method

Unit getUnit(
  1. dynamic name
)

Returns the Unit with the corresponding name

Implementation

Unit getUnit(var name) {
  return unitList.where((element) => element.name == name).single;
}