ScheduleStop.fromJson constructor
Creates a ScheduleStop object from a JSON object.
Implementation
factory ScheduleStop.fromJson(Map<String, dynamic> json) {
return ScheduleStop(
stopId: int.parse((json[ApiFields.stopId] ?? '0') as String),
name: json[ApiFields.name] ?? '',
seqNum: ((json[ApiFields.seqNum] ?? -1) as num).toInt(),
time: DateTime.tryParse(json[ApiFields.time] ?? '') ?? emptyDateTime,
);
}