stringToTransitRoutingPreferences function

TransitRoutingPreferences stringToTransitRoutingPreferences(
  1. String type
)

Implementation

TransitRoutingPreferences stringToTransitRoutingPreferences(String type) {
  if (type.toLowerCase() == 'less_walking') {
    return TransitRoutingPreferences.lessWalking;
  }
  if (type.toLowerCase() == 'fewer_transfers') {
    return TransitRoutingPreferences.fewerTransfers;
  }
  return null;
}