getType method

  1. @override
LocationType getType(
  1. String type
)
override

Returns the corresponding location type from all locations with type type

Implementation

@override
LocationType getType(String type) {
  return _locationTypes.firstWhere(
    (locationType) => locationType.getLocationType() == type,
    orElse: () => throw LocationTypeNotFoundException(
        "LocationType with type $type was not found"),
  );
}