RouteStep.fromJson constructor

RouteStep.fromJson(
  1. Map<String, dynamic> json
)

Implementation

RouteStep.fromJson(Map<String, dynamic> json) {
  name = json["name"];
  instructions = json["instructions"];
  distance = isNullOrZero(json["distance"]) ? 0.0 : json["distance"] + .0;
  expectedTravelTime = isNullOrZero(json["expectedTravelTime"])
      ? 0.0
      : json["expectedTravelTime"] + .0;
}