WorkoutSummary class
A WorkoutSummary object store vary metrics of a workout.
- workoutType - The type of workout. See HealthWorkoutActivityType for available types.
- totalDistance - The total distance that was traveled during a workout.
- totalEnergyBurned - The amount of energy that was burned during a workout.
- totalSteps - The number of steps during a workout.
- Annotations
-
- @JsonSerializable(fieldRename: FieldRename.snake, includeIfNull: false)
Constructors
- WorkoutSummary({required String workoutType, required num totalDistance, required num totalEnergyBurned, required num totalSteps})
- WorkoutSummary.fromHealthDataPoint(dynamic dataPoint)
-
Create a WorkoutSummary based on a health data point from native data format.
factory
-
WorkoutSummary.fromJson(Map<
String, dynamic> json) -
Create a HealthDataPoint from json.
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- totalDistance ↔ num
-
The total distance value of the workout.
getter/setter pair
- totalEnergyBurned ↔ num
-
The total energy burned value of the workout.
getter/setter pair
- totalSteps ↔ num
-
The total steps value of the workout.
getter/setter pair
- workoutType ↔ String
-
Workout type.
getter/setter pair
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Convert this HealthDataPoint to json.
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited