parse static method
Implementation
static Converter? parse(String id, {Converter? orElse}) {
try {
return Units.values.firstWhere((unit) => unit.id == id);
} on StateError {
if (orElse != null) {
return orElse;
} else {
rethrow;
}
}
}