CustomWorkout class

Represents a custom workout

Inheritance

Constructors

CustomWorkout({required WorkoutActivityType activityType, required WorkoutLocationType location, required String displayName, WorkoutStep? warmup, required List<IntervalBlock> blocks, WorkoutStep? cooldown})
Creates a new custom workout

Properties

activityType WorkoutActivityType
The activity type of the workout
final
blocks List<IntervalBlock>
The blocks of the workout
final
cooldown WorkoutStep?
The cooldown step of the workout (optional)
final
displayName String
The display name of the workout
final
hashCode int
The hash code for this object.
no setterinherited
location WorkoutLocationType
The location type of the workout
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
warmup WorkoutStep?
The warmup step of the workout (optional)
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) CustomWorkout
Creates a new custom workout from a JSON object