parseTrip function Null safety

Future<Road> parseTrip(
  1. ParserTripComputeArg data

parseTrip this method used to parse json get from trip service, the data is ParserTripComputeArg that contain information need it to be parsed to Road such as json map and language that will be instruction return Road object that contain list of waypoint and other information this road represent trip that will pass by all geopoint entered as args and this road will not be the shortes route


Future<Road> parseTrip(ParserTripComputeArg data) async {
  Map<String, dynamic> jsonResponse = data.jsonRoad;
  String languageCode = data.langCode;
  var road = Road.empty();
  final List<Map<String, dynamic>> routes =

  final route = routes.first;
  road = Road.fromOSRMJson(route, languageCode);

  return road;