LocationSample class

A position supplied by the host application.

Annotations

Constructors

LocationSample({required double latitude, required double longitude, double? accuracyMeters, DateTime? occurredAt, bool approximate = false, String? source})
Creates a sample and generates a UUID v4 when sampleId is omitted.
LocationSample.fromJson(Map<String, dynamic> json)
Restores a sample from an encrypted queue record.
factory

Properties

accuracyMeters → double?
Horizontal accuracy in metres, when supplied by the host.
final
approximate → bool
Whether the host deliberately reduced the precision of this sample.
final
hashCode → int
The hash code for this object.
no setterinherited
latitude → double
Latitude in WGS84 degrees.
final
longitude → double
Longitude in WGS84 degrees.
final
occurredAt → DateTime
Time at which the host observed the position, normalized to UTC.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sampleId → String
Stable UUID v4 for this sample, including when the sample is queued.
final
source → String?
Optional host-defined source, limited to 32 characters.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
Serializes exactly the sample shape required by API contract §1.
toString() → String
A string representation of this object.
inherited
validate({required DateTime now}) → void
Checks client-side constraints without making a network call.

Operators

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