π¨ Theme
Match SDK colors to your brand at initialize, then adjust at runtime after connect. Theme applies to both Nutrition and Training UI; runtime changes do not require re-connect.
Platform code & examples
Use the platform selector at the top of the sidebar (Android, iOS, Flutter, or React Native) β Theme on your platform.
Architectureβ
| Moment | What you set |
|---|---|
| Initialize | Full palette β primary, secondary, backgrounds, semantic colors |
| Runtime | Mode (light/dark/system), primary accent, reset |
Configuration (at initialize)β
Pass theme when you call initialize β before connect.
Propertiesβ
| Property | Purpose |
|---|---|
primaryLight / primaryDark | Main brand color per mode |
secondaryLight / secondaryDark | Secondary accents |
backgroundLight / backgroundDark | Screen backgrounds |
success, error, warning | Semantic feedback |
customLightTheme / customDarkTheme | Full ThemeData override (Flutter only) |
Pigeon: AzeooThemeConfig / AzeooThemeConfigMessage in pigeons/azeoo_api.dart.
Exampleβ
await AzeooSDK.initialize(apiKey, options: AzeooSDKInitOptions(
theme: ThemeConfig(
primaryLight: Color(0xFF0066CC),
primaryDark: Color(0xFF4DA3FF),
success: Colors.green,
error: Colors.red,
warning: Colors.amber,
),
));
Native hosts pass AzeooThemeConfig on AzeooSDK.initialize(...).
Runtime (after connect)β
| Method | Description |
|---|---|
getThemeMode / setThemeMode | Light, dark, or system |
setPrimaryColor | Update accent without full reconfig |
setTheme / setCustomThemes | Replace light/dark palettes |
resetToDefault | Restore initialize-time theme |
getCurrentTheme | Read active config (debug / sync host UI) |
| Host | Access |
|---|---|
| Flutter | AzeooSDK.changePrimaryColor, setCustomThemes, getCurrentThemeMode |
| Android / iOS / RN | sdk.theme.* |
// Flutter β after connect
AzeooSDK.changePrimaryColor(Colors.purple);
Pigeon: AzeooThemeApi.