Activity class Activity Store

An activity kept by an ActivityStore: identity, description, times, metrics, files and social data.

The local store is the system of record. An activity gets its localActivityID when inserted and its serverActivityID once synced.

See also:

Annotations

Constructors

Activity({int localActivityID = -1, int serverActivityID = -1, String clientUuid = '', String shareToken = '', String userID = '', String ownerName = '', bool revoked = false, ActivityRecord? record, String title = '', String location = '', int startTimeMillis = 0, int endTimeMillis = 0, int activeDurationMillis = 0, int createdAtMillis = 0, int updatedAtMillis = 0, ActivityMetrics? metrics, List<StoredActivityFile>? files, ActivitySocial? social})
Creates an Activity.

Properties

activeDurationMillis ↔ int
The moving (not paused) time in milliseconds.
getter/setter pair
clientUuid ↔ String
Stable client idempotency key, generated by the store on insert.
getter/setter pair
createdAtMillis ↔ int
The creation time in milliseconds since epoch (UTC).
getter/setter pair
endTimeMillis ↔ int
The end time in milliseconds since epoch (UTC).
getter/setter pair
files ↔ List<StoredActivityFile>
The attached files, including the canonical recorded track (ActivityFileType.sensors).
getter/setter pair
hashCode → int
The hash code for this object.
no setterinherited
localActivityID ↔ int
Local store id, assigned on insert; -1 until then.
getter/setter pair
location ↔ String
A human-readable place label.
getter/setter pair
metrics ↔ ActivityMetrics
The summary metrics.
getter/setter pair
ownerName ↔ String
The owner's display name (first name and last initial).
getter/setter pair
record ↔ ActivityRecord
Sport type, effort, visibility, descriptions and bike profile.
getter/setter pair
revoked ↔ bool
Whether this saved shared activity was made private or deleted by its owner.
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
serverActivityID ↔ int
Server id, assigned on sync; -1 until then.
getter/setter pair
shareToken ↔ String
Unguessable capability token of the share link, generated by the store on insert.
getter/setter pair
social ↔ ActivitySocial
Likes and comments. Not filled by the store yet, so always empty.
getter/setter pair
startTimeMillis ↔ int
The start time in milliseconds since epoch (UTC).
getter/setter pair
title ↔ String
The activity title.
getter/setter pair
updatedAtMillis ↔ int
The last update time in milliseconds since epoch (UTC); the newer copy wins when syncing.
getter/setter pair
userID ↔ String
The owner (the backend user id).
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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