Theming
Customize the SDK's appearance with themes. These concepts apply to all platforms. The example below uses Flutter (Dart); for Android, iOS, and React Native, see your platform's Configuration and Examples (Android · iOS · Flutter · React Native).
Theme configuration
Pass theme at initialize via options (Flutter) or config (native):
// Flutter
await AzeooSDK.initialize(apiKey, options: AzeooSDKInitOptions(
theme: ThemeConfig(
success: Colors.green,
error: Colors.red,
warning: Colors.yellow,
customLightTheme: ...,
customDarkTheme: ...,
),
));
On Android/iOS, pass a ThemeConfig or equivalent in the theme parameter of AzeooSDK.init(...).
Runtime theme changes
After connect, you can change theme via the SDK:
// Flutter
AzeooSDK.changePrimaryColor(Colors.blue);
AzeooSDK.setCustomThemes(...);
await AzeooSDK.getCurrentThemeMode();
On native, use sdk.theme (e.g. setMode, setPrimaryColor, setLightMode, setDarkMode, toggleMode).
Color Properties
- Primary colors (light/dark)
- Secondary colors
- Background colors
- Success, error, warning colors