Training Module
The Training module provides all training-related UI screens and functionality.
Accessing the module
After AzeooSDK.connect, use AzeooSDK.training:
AzeooSDK.training.showMainScreen();
Methods
showMainScreen
Shows the main training screen with an overview of all training features.
void showMainScreen()
Example:
training.showMainScreen();
showWorkoutPlans
Shows the workout plans screen where users can browse available workout plans.
void showWorkoutPlans()
Example:
training.showWorkoutPlans();
showWorkoutPlan
Shows a specific workout plan.
void showWorkoutPlan(String planId)
Parameters:
planId(String): The ID of the workout plan to display.
Example:
training.showWorkoutPlan('plan-123');
showExercises
Shows the exercises screen where users can browse the exercise library.
void showExercises()
Example:
training.showExercises();
showExercise
Shows a specific exercise.
void showExercise(String exerciseId)
Parameters:
exerciseId(String): The ID of the exercise to display.
Example:
training.showExercise('exercise-456');
showProgress
Shows the progress screen where users can track their fitness progress.
void showProgress()
Example:
training.showProgress();
showSchedule
Shows the schedule screen where users can manage their workout schedule.
void showSchedule()
Example:
training.showSchedule();
Complete Example
class TrainingScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
final training = AzeooUI.instance.training;
return Scaffold(
appBar: AppBar(title: Text('Training')),
body: ListView(
children: [
ListTile(
title: Text('Main Screen'),
onTap: () => training.showMainScreen(),
),
ListTile(
title: Text('Workout Plans'),
onTap: () => training.showWorkoutPlans(),
),
ListTile(
title: Text('Exercises'),
onTap: () => training.showExercises(),
),
ListTile(
title: Text('Progress'),
onTap: () => training.showProgress(),
),
ListTile(
title: Text('Schedule'),
onTap: () => training.showSchedule(),
),
],
),
);
}
}
Next Steps
- Nutrition Module - Nutrition-related screens
- Configuration - Customize the UI
- Client API - Low-level API reference