stringToRouteType function

RouteType stringToRouteType(
  1. String type
)

Implementation

RouteType stringToRouteType(String type) {
  if (type.toLowerCase() == 'tolls') return RouteType.tolls;
  if (type.toLowerCase() == 'highways') return RouteType.highways;
  if (type.toLowerCase() == 'ferries') return RouteType.ferries;
  if (type.toLowerCase() == 'indoor') return RouteType.indoor;
  return null;
}