WorkoutHealthValue class
A HealthValue object for workouts
Parameters:
- workoutActivityType - the type of workout
- totalEnergyBurned - the total energy burned during the workout
- totalEnergyBurnedUnit - the unit of the total energy burned
- totalDistance - the total distance of the workout
- totalDistanceUnit - the unit of the total distance
- Inheritance
-
- Object
- Serializable
- HealthValue
- WorkoutHealthValue
- Annotations
-
- @JsonSerializable(fieldRename: FieldRename.snake, includeIfNull: false)
Constructors
- WorkoutHealthValue({required HealthWorkoutActivityType workoutActivityType, int? totalEnergyBurned, HealthDataUnit? totalEnergyBurnedUnit, int? totalDistance, HealthDataUnit? totalDistanceUnit, int? totalSteps, HealthDataUnit? totalStepsUnit})
- WorkoutHealthValue.fromHealthDataPoint(dynamic dataPoint)
-
Create a WorkoutHealthValue based on a health data point from native data format.
factory
-
WorkoutHealthValue.fromJson(Map<
String, dynamic> json) -
factory
Properties
- $type ↔ String?
-
The runtime class name (type) of this object.
Used for deserialization from JSON objects.
getter/setter pairinherited
- fromJsonFunction → Function
-
The function which can convert a JSON string to an object of this type.
no setteroverride
- hashCode → int
-
The hash code for this object.
no setteroverride
- jsonType → String
-
Return the
__type
to be used for JSON serialization of this class. Default is runtimeType. Only specify this if you need another type.no setterinherited - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- totalDistance ↔ int?
-
The total distance covered during the workout.
Might not be available for all workouts.
getter/setter pair
- totalDistanceUnit ↔ HealthDataUnit?
-
The unit of the total distance covered during the workout.
Might not be available for all workouts.
getter/setter pair
- totalEnergyBurned ↔ int?
-
The total energy burned during the workout.
Might not be available for all workouts.
getter/setter pair
- totalEnergyBurnedUnit ↔ HealthDataUnit?
-
The unit of the total energy burned during the workout.
Might not be available for all workouts.
getter/setter pair
- totalSteps ↔ int?
-
The total steps covered during the workout.
Might not be available for all workouts.
getter/setter pair
- totalStepsUnit ↔ HealthDataUnit?
-
The unit of the total steps covered during the workout.
Might not be available for all workouts.
getter/setter pair
- workoutActivityType ↔ HealthWorkoutActivityType
-
The type of the workout.
getter/setter pair
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Return a JSON encoding of this object.
override
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override