BMFRoutePlanShareURLOption.fromMap constructor Null safety

BMFRoutePlanShareURLOption.fromMap(
  1. Map map
)

map => BMFRoutePlanShareURLOption

Implementation

BMFRoutePlanShareURLOption.fromMap(Map map)
    : assert(
          map != null, // ignore: unnecessary_null_comparison
          'Construct a BMFRoutePlanShareURLOption,The parameter map cannot be null !') {
  from = map['from'] == null ? null : BMFPlanNode.fromMap(map['from']);
  to = map['to'] == null ? null : BMFPlanNode.fromMap(map['to']);
  routePlanType =
      BMFRoutePlanShareURLType.values[map['routePlanType'] as int];
  cityID = map['cityID'];
  routeIndex = map['routeIndex'];
}