Skip to main content

πŸš€ Flutter Quick Start

Prerequisites​

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​