Skip to content

Commit

Permalink
Add extra fields to PlaceDetails and generate generated files
Browse files Browse the repository at this point in the history
  • Loading branch information
BenjiFarquhar committed Mar 25, 2023
1 parent 80936e9 commit 607718a
Show file tree
Hide file tree
Showing 9 changed files with 704 additions and 713 deletions.
36 changes: 18 additions & 18 deletions lib/src/core.dart
Original file line number Diff line number Diff line change
Expand Up @@ -161,13 +161,13 @@ class _TravelMode {

// ignore: unused_element
factory _TravelMode.fromJson(Map<String, dynamic> json) =>
_$_TravelModeFromJson(json);
Map<String, dynamic> toJson() => _$_TravelModeToJson(this);
_$TravelModeFromJson(json);
Map<String, dynamic> toJson() => _$TravelModeToJson(this);
}

extension TravelModeExt on TravelMode {
static TravelMode fromApiString(String mode) {
return _$enumDecode(_$TravelModeEnumMap, mode);
return $enumDecode(_$TravelModeEnumMap, mode);
}

String toApiString() {
Expand All @@ -190,13 +190,13 @@ class _RouteType {

// ignore: unused_element
factory _RouteType.fromJson(Map<String, dynamic> json) =>
_$_RouteTypeFromJson(json);
Map<String, dynamic> toJson() => _$_RouteTypeToJson(this);
_$RouteTypeFromJson(json);
Map<String, dynamic> toJson() => _$RouteTypeToJson(this);
}

extension RouteTypeExt on RouteType {
static RouteType fromApiString(String mode) {
return _$enumDecode(_$RouteTypeEnumMap, mode);
return $enumDecode(_$RouteTypeEnumMap, mode);
}

String toApiString() {
Expand All @@ -216,13 +216,13 @@ class _Unit {
_Unit(this.value);

// ignore: unused_element
factory _Unit.fromJson(Map<String, dynamic> json) => _$_UnitFromJson(json);
Map<String, dynamic> toJson() => _$_UnitToJson(this);
factory _Unit.fromJson(Map<String, dynamic> json) => _$UnitFromJson(json);
Map<String, dynamic> toJson() => _$UnitToJson(this);
}

extension UnitExt on Unit {
static Unit fromApiString(String mode) {
return _$enumDecode(_$UnitEnumMap, mode);
return $enumDecode(_$UnitEnumMap, mode);
}

String toApiString() {
Expand All @@ -245,13 +245,13 @@ class _TrafficModel {

// ignore: unused_element
factory _TrafficModel.fromJson(Map<String, dynamic> json) =>
_$_TrafficModelFromJson(json);
Map<String, dynamic> toJson() => _$_TrafficModelToJson(this);
_$TrafficModelFromJson(json);
Map<String, dynamic> toJson() => _$TrafficModelToJson(this);
}

extension TrafficModelExt on TrafficModel {
static TrafficModel fromApiString(String mode) {
return _$enumDecode(_$TrafficModelEnumMap, mode);
return $enumDecode(_$TrafficModelEnumMap, mode);
}

String toApiString() {
Expand All @@ -275,13 +275,13 @@ class _TransitMode {

// ignore: unused_element
factory _TransitMode.fromJson(Map<String, dynamic> json) =>
_$_TransitModeFromJson(json);
Map<String, dynamic> toJson() => _$_TransitModeToJson(this);
_$TransitModeFromJson(json);
Map<String, dynamic> toJson() => _$TransitModeToJson(this);
}

extension TransitModeExt on TransitMode {
static TransitMode fromApiString(String mode) {
return _$enumDecode(_$TransitModeEnumMap, mode);
return $enumDecode(_$TransitModeEnumMap, mode);
}

String toApiString() {
Expand All @@ -304,13 +304,13 @@ class _TransitRoutingPreferences {

// ignore: unused_element
factory _TransitRoutingPreferences.fromJson(Map<String, dynamic> json) =>
_$_TransitRoutingPreferencesFromJson(json);
Map<String, dynamic> toJson() => _$_TransitRoutingPreferencesToJson(this);
_$TransitRoutingPreferencesFromJson(json);
Map<String, dynamic> toJson() => _$TransitRoutingPreferencesToJson(this);
}

extension TransitRoutingPreferencesExt on TransitRoutingPreferences {
static TransitRoutingPreferences fromApiString(String mode) {
return _$enumDecode(_$TransitRoutingPreferencesEnumMap, mode);
return $enumDecode(_$TransitRoutingPreferencesEnumMap, mode);
}

String toApiString() {
Expand Down
161 changes: 59 additions & 102 deletions lib/src/core.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 607718a

Please sign in to comment.