Skip to main content

πŸ‹οΈ 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 callShows
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();

See also​