π Flutter Quick Start
Prerequisitesβ
- Flutter SDK (see repo
pubspec.yaml) - API key from Client Platform
- Integration checklist
Step 1: Add dependencyβ
Path dependency (monorepo / internal):
dependencies:
azeoo_sdk:
path: ../../
azeoo_core:
path: ../../plugins/core
Published package: use your internal registry version when available.
Step 2: Initializeβ
import 'package:azeoo_sdk/azeoo_sdk.dart';
await AzeooSDK.initialize(
'YOUR_API_KEY',
options: AzeooSDKInitOptions(
locale: 'en',
analyticsEnabled: true,
offlineSupport: true,
safeArea: const SafeAreaConfig.none(),
deepLinks: const DeepLinkConfig(
scheme: 'nutrition',
host: 'nutrition.com',
),
theme: themeConfig,
),
);
Step 3: Connectβ
Pass a User JWT created by your backend. See Creating the User JWT for the payload spec and backend code examples.
await AzeooSDK.connect(
token: userJwt, // JWT from YOUR backend β see link above
gender: user.gender,
height: Height.scalar(user.heightCm, HeightUnit.centimeters),
weight: Weight.scalar(user.weightKg, WeightUnit.kilograms),
);
// Optional: AzeooSDK.userId
Step 4: Show nutrition UIβ
Touch the module (initializes routing), then build the screen:
final _ = AzeooSDKModules.nutrition;
setState(() {
child = buildNutritionMainScreen(bottomSafeArea: false);
});
Or switch routes inside the SDK:
AzeooSDKModules.nutrition.showMainScreen();
AzeooSDKModules.training.showMainScreen();
For a single combined surface, see AzeooSDKContent in the example app (lib/core/app/azeoo_sdk_content.dart).
Step 5: Disconnectβ
await AzeooSDK.disconnect();
// or AzeooSDK.resetSession();
Next stepsβ
- Creating the User JWT β payload spec and backend code
- Configuration
- UI components
- Measurements