Exemples Flutter
Les exemples suivent le flux actuel : AzeooSDK.initialize, puis AzeooSDK.connect, ensuite AzeooSDKModules.nutrition ou AzeooSDKContent.
Initialiser et connecter
import 'package:azeoo_sdk/sdk/azeoo_sdk.dart';
Future<void> initSDK(String token) async {
await AzeooSDK.initialize(
'your-sdk-api-key',
options: AzeooSDKInitOptions(
locale: 'en',
analyticsEnabled: true,
offlineSupport: true,
safeArea: const SafeAreaConfig.all(),
),
);
await AzeooSDK.connect(
token: userToken,
gender: 'male',
height: Height(178),
weight: Weight(75),
);
}
Intégrer l’UI du SDK (AzeooSDKContent)
import 'package:azeoo_sdk/core/app/azeoo_sdk_content.dart';
// In your widget tree
AzeooSDKContent()
Ouvrir des écrans
import 'package:azeoo_sdk/sdk/azeoo_sdk.dart';
AzeooSDKModules.nutrition.showMainScreen(bottomSafeArea: true);
AzeooSDKModules.nutrition.showBarcodeScanner();
Exemple complet d’application
Le projet example/flutter_example contient une application complète (authentification, AzeooSDKContent et personnalisation du thème).