π§ Flutter β Navigation
Pure Flutter apps use AzeooSDKModules instead of native AzeooDestination.
Native hosts
Android / iOS / RN use typed destinations. This page is for Flutter-only integration.
Prerequisitesβ
await AzeooSDK.initialize(apiKey, options: AzeooSDKInitOptions(/* β¦ */));
await AzeooSDK.connect(
token: jwt,
gender: Gender.male,
height: 180,
weight: 75,
);
Show screens (imperative)β
// Nutrition
await AzeooSDKModules.nutrition.showMainScreen();
await AzeooSDKModules.nutrition.showDiary(date: DateTime.now());
await AzeooSDKModules.nutrition.showPlan('plan-uuid');
await AzeooSDKModules.nutrition.showRecipe(42, name: 'Pasta');
await AzeooSDKModules.nutrition.showScanner(ScannerKind.barcode);
await AzeooSDKModules.nutrition.showSearch();
await AzeooSDKModules.nutrition.showCart();
// Training
await AzeooSDKModules.training.showMainScreen();
await AzeooSDKModules.training.showWorkouts();
danger
Use AzeooSDKModules.nutrition / .training β not AzeooSDK.nutrition.
Embed in widget treeβ
AzeooSDKModules.nutrition.buildNutritionMainScreen(bottomSafeArea: false);
AzeooSDKModules.training.buildTrainingMainScreen();
Example shell: example/flutter_example/lib/core/app/azeoo_sdk_content.dart.
Mapping to native destinationsβ
Native navigate | Flutter |
|---|---|
.nutrition(.home) | showMainScreen() |
.nutrition(.diary) | showDiary() |
.nutrition(.plan(id)) | showPlan(id) |
.training(.workouts) | showWorkouts() |
Full native list: Destination catalogue.
Deep linksβ
Configure at initialize:
options: AzeooSDKInitOptions(
deepLinks: DeepLinkConfig(
scheme: 'yourapp',
host: 'yourapp.com',
pathPrefix: '/sdk',
),
),
Handle with your router (go_router, etc.) or SDK helpers if exposed on your build β align paths with internal routes.