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