ποΈ Training Module (React Native)
The Training module's screens are reached through the typed Destination factory:
import { Destination } from 'react-native-azeoo-lib';
sdk.navigate(Destination.training.workouts());
Destinationsβ
Every routable training screen, as a factory on Destination.training:
| Factory call | Shows |
|---|---|
Destination.training.home() | Training home |
Destination.training.workouts() | Workout plan list |
Destination.training.exercises() | Exercise list |
Destination.training.progress() | Progress |
Destination.training.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 workout(id) or exercise(id) factories β there's no Flutter route to navigate to. The previous stringly call sdk.navigateTo('training', 'workout-plans/abc') accepted IDs but they were silently ignored on the Flutter side.
Examplesβ
Open the workouts listβ
await sdk.navigate(Destination.training.workouts());
Open progressβ
await sdk.navigate(Destination.training.progress());
Go to the scheduleβ
await sdk.navigate(Destination.training.schedule());
Embedding the moduleβ
import { TrainingView } from 'react-native-azeoo-lib';
export default function TrainingTab() {
return (
<TrainingView
bottomSafeArea={false}
onLoad={() => console.log('Training ready')}
onError={(err) => console.error(err)}
/>
);
}
Going backβ
await sdk.goBack();
await sdk.backToRoot(); // back to training home
const can = await sdk.canGoBack();