WorkoutEvent class

Equivalent of WorkoutEvent from HealthKitReporter https://cocoapods.org/pods/HealthKitReporter

Supports map representation.

Has a WorkoutEvent.fromJson constructor to create instances from JSON payload coming from iOS native code. And supports multiple object creation by collect method from JSON list.

Requires WorkoutType permissions provided.

Constructors

WorkoutEvent(num startTimestamp, num endTimestamp, num duration, WorkoutEventHarmonized harmonized)
const
WorkoutEvent.fromJson(Map<String, dynamic> json)
General constructor from JSON payload

Properties

duration num
final
endTimestamp num
final
harmonized WorkoutEventHarmonized
final
hashCode int
The hash code for this object.
no setterinherited
map Map<String, dynamic>
General map representation
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
startTimestamp num
final

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

Static Methods

collect(List list) List<WorkoutEvent>
Simplifies creating a list of objects from JSON payload.