WorkoutGoal class
Represents a workout goal
Constructors
- WorkoutGoal({required WorkoutGoalType type, double? targetValue, Duration? targetDuration, WorkoutGoalUnit? unit})
-
Creates a new workout goal
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- targetDuration → Duration?
-
The target duration of the goal
targetDuration is required if the goal type is time
final
- targetValue → double?
-
The target value of the goal
targetValue is required if the goal type is distance or energy
final
- type → WorkoutGoalType
-
The type of the goal
final
- unit → WorkoutGoalUnit?
-
The unit of the goal
unit is required if the goal type is distance or energy
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Converts the workout goal to a JSON object
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
fromJson(
Map< String, dynamic> json) → WorkoutGoal - Creates a new workout goal from a JSON object