π§ 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β
import 'package:azeoo_core/azeoo_core.dart';
import 'package:azeoo_sdk/azeoo_sdk.dart';
await AzeooSDK.initialize(apiKey, options: AzeooSDKInitOptions(/* β¦ */));
await AzeooSDK.connect(
token: jwt,
gender: 'male',
height: Height.scalar(180, HeightUnit.centimeters),
weight: Weight.scalar(75, WeightUnit.kilograms),
);
Show screens (imperative)β
// Nutrition
AzeooSDKModules.nutrition.showMainScreen();
AzeooSDKModules.nutrition.showPlan('plan-uuid');
AzeooSDKModules.nutrition.showPlans();
AzeooSDKModules.nutrition.showRecipe('recipe-id');
AzeooSDKModules.nutrition.showRecipes();
AzeooSDKModules.nutrition.showBarcodeScanner();
AzeooSDKModules.nutrition.showMobileScanner();
AzeooSDKModules.nutrition.showNutritionSearch();
AzeooSDKModules.nutrition.showCart();
// Training
AzeooSDKModules.training.showMainScreen();
AzeooSDKModules.training.showWorkouts();
danger
Use AzeooSDKModules.nutrition / .training β not AzeooSDK.nutrition.
Embed in widget treeβ
For host Flutter apps, embed the full SDK UI with AzeooSDKContent:
import 'package:azeoo_sdk/core/app/azeoo_sdk_content.dart';
Scaffold(
body: AzeooSDKContent(bottomSafeArea: false),
)
AzeooSDKContent creates its own router scope and works inside your existing MaterialApp.
Example-only helpers
buildNutritionMainScreen() in the example app is not part of the public SDK API.
Mapping to native destinationsβ
Native navigate | Flutter |
|---|---|
.nutrition(.home) / .diary | showMainScreen() |
.nutrition(.plans) | showPlans() |
.nutrition(.plan(id)) | showPlan(id) |
.nutrition(.recipe(id)) | showRecipe(id) |
.nutrition(.scanner(.barcode)) | showBarcodeScanner() |
.nutrition(.search) | showNutritionSearch() |
.nutrition(.cart) | showCart() |
.training(.workouts) | showWorkouts() |
Full native list: Destination catalogue.
Deep linksβ
Configure at initialize:
options: AzeooSDKInitOptions(
deepLinks: DeepLinkConfig(
scheme: 'yourapp',
host: 'yourapp.com',
removePathPrefix: '/sdk',
),
),
Flutter uses removePathPrefix; native platforms use pathPrefix on their deep link config.
Handle with your router (go_router, etc.) or SDK helpers if exposed on your build β align paths with internal routes.