FuelStation class

Represents a fuel station and the price of a specific fuel type.

Annotations
  • @freezed

Constructors

FuelStation({@JsonKey.new(name: 'station_id') required String stationId, required String brand, required String address, required String municipality, @PrefectureConverter() required Prefecture prefecture, required double latitude, required double longitude, @FuelTypeConverter() @JsonKey.new(name: 'fuel_type') required FuelType fuelType, @JsonKey.new(name: 'raw_fuel_type') required String rawFuelType, @JsonKey.new(name: 'fuel_price') required double price, required DateTime date})
Creates a new FuelStation instance.
const
factory
FuelStation.fromJson(Map<String, dynamic> json)
Creates a FuelStation from a JSON map.
factory

Properties

address String
no setterinherited
brand String
no setterinherited
copyWith → $FuelStationCopyWith<FuelStation>
Create a copy of FuelStation with the given fields replaced by the non-null parameter values.
no setterinherited
date DateTime
no setterinherited
fuelType FuelType
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
latitude double
no setterinherited
longitude double
no setterinherited
municipality String
no setterinherited
prefecture Prefecture
no setterinherited
price double
no setterinherited
rawFuelType String
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stationId String
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Serializes this FuelStation to a JSON map.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited