LocationMeasure class

Specify the configuration on how to collect location data.

Inheritance
Annotations

Constructors

LocationMeasure(MeasureType type, {String name, bool enabled, Duration frequency, Duration duration, GeolocationAccuracy accuracy = GeolocationAccuracy.best, double distance = 0})
LocationMeasure.fromJson(Map<String, dynamic> json)
factory

Properties

$type String
The runtime class name (type) of this object. Used for deserialization from JSON objects.
read / write, inherited
accuracy GeolocationAccuracy
Defines the desired accuracy that should be used to determine the location data. [...]
read / write
configuration Map<String, String>
A key-value map holding any application-specific configuration.
read / write, inherited
distance double
The minimum distance (measured in meters) a device must move horizontally before an update event is generated. [...]
read / write
duration Duration
The sampling duration.
read / write, inherited
enabled bool
Whether the measure is enabled - i.e. collecting data - when the study is running. A measure is enabled as default.
read / write, inherited
frequency Duration
Sampling frequency (i.e., delay between sampling).
read / write, inherited
hashCode int
The hash code for this object. [...]
read-only, inherited
name String
A printer-friendly name for this measure.
read / write, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
type MeasureType
The type of measure to do.
read / write, inherited

Methods

adapt(Measure measure) → void
Adapt this Measure to a new value specified in measure.
inherited
addMeasureListener(MeasureListener listener) → void
Add a MeasureListener to this Measure.
inherited
getConfiguration(String key) String
Get value from the configuration for this measure.
inherited
hasChanged() Future<void>
Call this method when this measure has changed.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
registerFromJson(Function fromJsonFunction) → void
Use this method to register a custom fromJson function for this class in the FromJsonFactory.
inherited
removeMeasureListener(MeasureListener listener) → void
Remove a MeasureListener to this Measure.
inherited
restore() → void
Restore this Measure to its original value before adapt was called. [...]
inherited
setConfiguration(String key, String configuration) → void
Add a key-value pair as configuration for this measure.
inherited
toJson() Map<String, dynamic>
Return a JSON encoding of this object.
override
toString() String
A string representation of this object. [...]
override

Operators

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

Static Properties

fromJsonFunction Function
read-only, override