🧠Flutter — Navigation
Les applications Flutter pures utilisent AzeooSDKModules au lieu de AzeooDestination natif.
HĂ´tes natifs
Android / iOS / RN utilisent les destinations typées. Cette page concerne l'intégration Flutter uniquement.
Prérequis​
await AzeooSDK.initialize(apiKey, options: AzeooSDKInitOptions(/* … */));
await AzeooSDK.connect(
token: jwt,
gender: Gender.male,
height: 180,
weight: 75,
);
Afficher des écrans (impératif)​
// 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
Utilisez AzeooSDKModules.nutrition / .training — pas AzeooSDK.nutrition.
Intégrer dans l'arbre de widgets​
AzeooSDKModules.nutrition.buildNutritionMainScreen(bottomSafeArea: false);
AzeooSDKModules.training.buildTrainingMainScreen();
Exemple de shell : example/flutter_example/lib/core/app/azeoo_sdk_content.dart.
Correspondance avec les destinations natives​
navigate natif | Flutter |
|---|---|
.nutrition(.home) | showMainScreen() |
.nutrition(.diary) | showDiary() |
.nutrition(.plan(id)) | showPlan(id) |
.training(.workouts) | showWorkouts() |
Liste native complète : Catalogue des destinations.
Liens profonds​
Configurer Ă l'initialisation :
options: AzeooSDKInitOptions(
deepLinks: DeepLinkConfig(
scheme: 'yourapp',
host: 'yourapp.com',
pathPrefix: '/sdk',
),
),
Gérez avec votre routeur (go_router, etc.) ou les helpers SDK s'ils sont exposés sur votre build — alignez les chemins avec routes internes.