toJson method
Builds the native request arguments. Route ids and time are serialized as decimal strings to preserve the full signed 64-bit precision across the JSON channel on every platform (including web, where ints are IEEE doubles).
Implementation
Map<String, dynamic> toJson() => <String, dynamic>{
'routeIds': routeIds.map((int id) => id.toString()).toList(),
'lineNames': lineNames,
'headings': headings,
'maxRows': maxRows,
'window': window?.inSeconds ?? 0,
'time': (time == null ? 0 : time!.toUtc().millisecondsSinceEpoch ~/ 1000)
.toString(),
'shapes': shapes,
};