SingleGoalWorkout class
Represents a single goal workout
Constructors
- SingleGoalWorkout({required WorkoutActivityType activityType, required WorkoutGoal goal, WorkoutLocationType? location, WorkoutSwimmingLocationType? swimmingLocation})
- Creates a new single goal workout
Properties
- activityType → WorkoutActivityType
-
The activity type of the workout
final
- goal → WorkoutGoal
-
The goal of the workout
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- location → WorkoutLocationType?
-
The location of the workout (optional)
location is required if the activity type is not swimming
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- swimmingLocation → WorkoutSwimmingLocationType?
-
The swimming location of the workout (optional)
swimmingLocation is required if the activity type is swimming
final
- workoutType → WorkoutType
-
The type of workout this represents
finalinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Converts the workout to a JSON object
override
-
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) → SingleGoalWorkout - Creates a new single goal workout from a JSON object