fromString static method

UnitSpeed fromString(
  1. String symbol
)

Creates a new unit speed from a string

Implementation

static UnitSpeed fromString(String symbol) {
  return UnitSpeed.values.firstWhere((e) => e.symbol == symbol);
}