RecordMetrics class Sensor Data Source
Performance metrics produced while a recording is active.
RecordMetrics is exposed by the Recorder while it is in RecorderStatus.recording. The values reset at the start of each recording session and provide realtime measurements that can be used in UI or analytics.
See also:
- Recorder - Accessing recording functionality.
- LogMetrics - Metrics persisted with a saved log.
- Implemented types
Constructors
- RecordMetrics({double distanceMeters = 0.0, double elevationGainMeters = 0.0, double avgSpeedMps = 0.0})
- Creates a RecordMetrics instance.
-
RecordMetrics.fromJson(Map<
String, dynamic> json) -
Deserializes a JSON-compatible map to create a RecordMetrics instance.
factory
Properties
- avgSpeedMps ↔ double
-
The average speed, in meters per second.
getter/setter pair
- distanceMeters ↔ double
-
The total distance traveled, in meters.
getter/setter pair
- elevationGainMeters ↔ double
-
The total elevation gain, in meters.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Serializes this instance to a JSON-compatible map.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
covariant RecordMetrics other) → bool -
The equality operator.
override