Location class
A data class that represents a location model.
Constructors
- Location({required double latitude, required double longitude, required double accuracy, required double altitude, required double heading, required double speed, required double speedAccuracy, required double millisecondsSinceEpoch, required DateTime timestamp, required bool isMock})
-
Constructs an instance of Location.
const
-
Location.fromJson(Map<
String, dynamic> json) -
Constructs an instance of Location from
json
.factory
Properties
- accuracy → double
-
The accuracy of the location.
final
- altitude → double
-
The altitude of the location.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- heading → double
-
The angle in the direction the device is moving.
final
- isMock → bool
-
Whether the mock location.
final
- latitude → double
-
The latitude of the location.
final
- longitude → double
-
The longitude of the location.
final
- millisecondsSinceEpoch → double
-
The millisecondsSinceEpoch at which the location update occurred.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- speed → double
-
The movement speed of the device.
final
- speedAccuracy → double
-
The accuracy of speed.
final
- timestamp → DateTime
-
The device time at which the location update occurred.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Returns the data fields of Location in JSON format.
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override