Route.fromJson constructor

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

Creates a Route object from a JSON object.

Implementation

factory Route.fromJson(Map<String, dynamic> json) {
  return Route(
    routeId: json[ApiFields.routeId] ?? '',
    name: json[ApiFields.name] ?? '',
    lineDescription: json[ApiFields.lineDescription] ?? '',
  );
}