Public Access
chore(formatting): autoformats and adaptations
This commit is contained in:
@@ -8,7 +8,6 @@ class Route {
|
||||
});
|
||||
|
||||
// from trip API request
|
||||
|
||||
factory Route.fromJson(Map<String, dynamic> json) => Route(
|
||||
segments: json["LegList"]["Leg"].map((leg) => Segment.fromJson(leg)),
|
||||
duration:
|
||||
@@ -58,8 +57,9 @@ class Station {
|
||||
id: json["id"] as String? ?? json["extId"] as String,
|
||||
name: json["name"],
|
||||
transportLines: json.containsKey("productAtStop")
|
||||
? json["productAtStop"].map((jsonLine) =>
|
||||
Line.fromJson(jsonLine as Map<String, dynamic>))
|
||||
? json["productAtStop"].map(
|
||||
(jsonLine) => Line.fromJson(jsonLine as Map<String, dynamic>),
|
||||
)
|
||||
: const [],
|
||||
);
|
||||
}
|
||||
@@ -126,7 +126,7 @@ class Departure {
|
||||
Departure({
|
||||
required this.vehicle,
|
||||
required this.station,
|
||||
required this.departureTime
|
||||
required this.departureTime,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -138,22 +138,21 @@ class Color {
|
||||
Color({
|
||||
required this.r,
|
||||
required this.g,
|
||||
required this.b
|
||||
required this.b,
|
||||
});
|
||||
|
||||
factory Color.fromJson(Map<String, dynamic> json) => Color(
|
||||
r: json["r"],
|
||||
g: json["g"],
|
||||
b: json["b"]
|
||||
b: json["b"],
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
enum VehicleType{
|
||||
enum VehicleType {
|
||||
bus,
|
||||
tram,
|
||||
metro,
|
||||
subway,
|
||||
regionalTrain,
|
||||
PLACEHOLDER
|
||||
PLACEHOLDER,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user