Flutter API Reference
API reference for the Azeoo SDK on Flutter. The current flow is AzeooSDK.initialize(apiKey, options) then AzeooSDK.connect(userId, token); see Flutter Quick Start and SDK API.
AzeooSDK (static)
- initialize(apiKey, options) — Initialize once;
optionsis an optionalAzeooSDKInitOptions(locale, theme, deepLinks, safeArea, analyticsEnabled, offlineSupport). - connect(userId, token) — Attach user; required before nutrition/training/user.
- disconnect() — Clear user.
- isInitialized, isConnected, userId, user, config, nutrition, training — Status and module access.
- changePrimaryColor, setCustomThemes, getCurrentThemeMode — Theme helpers.
Table of Contents
AzeooClient (internal)
Internal implementation; use AzeooSDK.initialize and AzeooSDK.connect for the public flow.
Properties
apiKey: String- The API key used for initializationisInitialized: bool(static) - Whether the client is initializedtokenManager: TokenManager- Access to the token manageranalytics: AnalyticsService- Access to the analytics service
Methods
validateApiKey
Future<bool> validateApiKey()
Validates the API key with the server.
Returns: Future<bool> - true if valid, false otherwise
getSubscriptions
List<String> getSubscriptions()
Gets list of active subscriptions.
Returns: List<String> - List of subscription IDs
AzeooUser
User management and profile operations.
Initialization
AzeooUser({required AzeooClient client, required String userId})
Creates a new AzeooUser instance.
Parameters:
client(AzeooClient): The initialized AzeooClient instanceuserId(String): Unique identifier for the user
Methods
logout
static Future<void> logout()
Logs out the current user and clears user-specific data.
changeHeight
Future<void> changeHeight(double height)
Updates the user's height.
Parameters:
height(double): Height in centimeters
changeWeight
Future<void> changeWeight(double weight)
Updates the user's weight.
Parameters:
weight(double): Weight in kilograms
getProfile
Future<UserProfile> getProfile()
Retrieves the user's profile information.
Returns: Future<UserProfile> - The user's profile
getToken
Future<String> getToken()
Gets the current authentication token.
Returns: Future<String> - The authentication token
update
Future<void> update(Map<String, dynamic> data)
Updates user information.
Parameters:
data(Map<String, dynamic>): User data to update
delete
Future<void> delete()
Deletes the user account.
AzeooUI
UI components and navigation management.
Initialization
static Future<void> initialize({
required AzeooClient client,
required AzeooUIConfig config,
ProviderContainer? container,
})
Initializes the UI SDK.
Parameters:
client(AzeooClient): The initialized AzeooClient instanceconfig(AzeooUIConfig): UI configurationcontainer(ProviderContainer?, optional): Optional provider container
Instance Access
static AzeooUI get instance
Gets the singleton instance.
Properties
nutrition: NutritionModule- Access to the nutrition moduletraining: TrainingModule- Access to the training moduleconfig: AzeooUIConfig- Current configuration
Theme Methods
changePrimaryColor
void changePrimaryColor(Color newColor)
Changes the primary color for both light and dark themes.
setLightMode
void setLightMode()
Sets theme to light mode.
setDarkMode
void setDarkMode()
Sets theme to dark mode.
setSystemMode
void setSystemMode()
Follows system theme.
toggleThemeMode
Future<void> toggleThemeMode()
Toggles between light and dark mode.
Reset
static Future<void> reset()
Resets the SDK, clearing user-specific data.
Nutrition Module
Access through AzeooUI.instance.nutrition.
Methods
showMainScreen
void showMainScreen({bool? bottomSafeArea})
Shows the main nutrition screen.
showNutritionPlans
void showNutritionPlans()
Shows the nutrition plans screen.
showNutritionPlan
void showNutritionPlan(String planId)
Shows a specific nutrition plan.
showUserNutritionPlan
void showUserNutritionPlan()
Shows the user's nutrition plan.
showRecipes
void showRecipes()
Shows the recipes screen.
showRecipe
void showRecipe(int recipeId, {String? recipeName})
Shows a specific recipe.
showBarcodeScanner
void showBarcodeScanner()
Shows the barcode scanner.
showMobileScanner
void showMobileScanner()
Shows the mobile scanner.
showCart
void showCart()
Shows the shopping cart.
showNutritionSearch
void showNutritionSearch()
Shows the nutrition search screen.
showAddSelection
void showAddSelection()
Shows the add selection screen.
showAddFood
void showAddFood()
Shows the add food screen.
showAddMeal
void showAddMeal()
Shows the add meal screen.
Training Module
Access through AzeooUI.instance.training.
Methods
showMainScreen
void showMainScreen()
Shows the main training screen.
showWorkoutPlans
void showWorkoutPlans()
Shows the workout plans screen.
showWorkoutPlan
void showWorkoutPlan(String planId)
Shows a specific workout plan.
showExercises
void showExercises()
Shows the exercises screen.
showExercise
void showExercise(String exerciseId)
Shows a specific exercise.
showProgress
void showProgress()
Shows the progress screen.
showSchedule
void showSchedule()
Shows the schedule screen.
Configuration Types
AzeooUIConfig
Main UI configuration.
AzeooUIConfig({
required String userId,
required String authToken,
String? locale,
required bool analyticsEnabled,
required bool offlineSupport,
required SafeAreaConfig safeArea,
ThemeConfig? theme,
DeepLinkConfig? deepLinkConfig,
})
ThemeConfig
Theme configuration.
ThemeConfig({
Color? lightPrimaryColor,
Color? lightSecondaryColor,
Color? lightTertiaryColor,
Color? lightBackgroundColor,
Color? darkPrimaryColor,
Color? darkSecondaryColor,
Color? darkTertiaryColor,
Color? darkBackgroundColor,
Color? success,
Color? error,
Color? warning,
})
SafeAreaConfig
Safe area configuration.
SafeAreaConfig({
bool top = true,
bool bottom = true,
bool left = true,
bool right = true,
})
DeepLinkConfig
Deep linking configuration.
DeepLinkConfig({
List<String>? appLinkHosts,
})
Error Handling
SDKInitializationException
Thrown when SDK initialization fails.
try {
await AzeooSDK.initialize('your-api-key', AzeooSDKInitOptions());
} on SDKInitializationException catch (e) {
print('Initialization failed: ${e.message}');
}
Next Steps
- Flutter Documentation - Platform overview
- UI Components - Pre-built UI components
- Client API - Low-level API reference
- Examples - Code examples
- Configuration - Configuration guide