ActivityRecord class Sensor Data Source

Represents metadata for a recorded activity.

Contains short and long descriptions, the sport type, perceived effort level, an optional bicycle profile for cycling or e-bike activities, and visibility settings that control who can view the activity. Attach an ActivityRecord to a recording (for example via Recorder.activityRecord) to store user-provided metadata about the session.

The ActivityRecord is not detected automatically; it must be explicitly set by the user.

See also:

Constructors

ActivityRecord({String shortDescription = '', String longDescription = '', SportType sportType = SportType.unknown, EffortType effortType = EffortType.easy, BikeProfileElectricBikeProfile? bikeProfile, ActivityVisibility visibility = ActivityVisibility.everyone})
Creates an ActivityRecord with the specified properties.
ActivityRecord.fromJson(Map<String, dynamic> json)
Deserializes a JSON-compatible map to create an instance.
factory

Properties

bikeProfile BikeProfileElectricBikeProfile?
The bicycle profile, if the activity involves cycling.
getter/setter pair
effortType EffortType
The effort level for this activity.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
longDescription String
A detailed description of the activity.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shortDescription String
A short description of the activity.
getter/setter pair
sportType SportType
The type of sport for this activity.
getter/setter pair
visibility ActivityVisibility
The visibility settings for the activity.
getter/setter pair

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 ==(Object other) bool
The equality operator.
inherited