ποΈ 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:
| Destination | Shows |
|---|---|
.home | Training home |
.workouts | Workout plan list |
.exercises | Exercise list |
.progress | Progress |
.schedule | Schedule |
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 */ }