Skip to main content

πŸ‹οΈ Training Module (iOS)

The Training module's screens are reached through the typed AzeooDestination API:

sdk.navigate(to: .training(.workouts))

Destinations​

Every routable training screen, as a case of AzeooDestination.Training:

DestinationShows
.homeTraining home
.workoutsWorkout plan list
.exercisesExercise list
.progressProgress
.scheduleSchedule
Detail screens are modal sheets

Workout detail and exercise detail are shown as modal sheets inside Flutter, not as routable destinations. The typed API intentionally does not expose .training(.workout(id:)) or .training(.exercise(id:)) β€” those would have no route to navigate to. The previous showPlan(planId:) and showExercise(exerciseId:) methods accepted IDs but silently ignored them; the typed API makes this limitation explicit.

Examples​

Open the workouts list​

sdk.navigate(to: .training(.workouts))

Open progress​

sdk.navigate(to: .training(.progress))

Go to the schedule​

sdk.navigate(to: .training(.schedule))

Embedding the module​

For a tab-based UIKit or SwiftUI app, use sdk.tabHost(for: .training) plus the appropriate coordinator β€” see Multi-tab hosting for full examples.

For a one-off full-screen presentation:

sdk.modules.training.display(in: hostVC, bottomSafeArea: true) { result in
// Flutter is now embedded in `hostVC`.
sdk.navigate(to: .training(.exercises))
}

SwiftUI​

sdk.modules.training.getView(bottomSafeArea: true)
.frame(maxWidth: .infinity, maxHeight: .infinity)

Going back​

sdk.back()
sdk.backToRoot() // back to training home
sdk.canGoBack { result in /* Bool */ }

See also​