Overview
ThemeConfig allows you to customize the visual appearance of the checkout interface by configuring colors and accessing predefined text styles that match Flutter’s Material Design text theme.
Constructor
Parameters
The primary color used throughout the checkout UI. This color is applied to buttons, progress indicators, and accent elements.
Properties
Returns the primary color configured for the checkout theme. This is a read-only getter that accesses the internal
_primaryColor field.A static
TextTheme containing predefined text styles for the checkout interface. Maps to Flutter’s Material Design text theme with the following styles:displayLarge- Headline 1 (largest)displayMedium- Headline 2displaySmall- Headline 3headlineMedium- Headline 4headlineSmall- Headline 5titleLarge- Headline 6bodyLarge- Body 1bodySmall- Body 2 / CaptionlabelLarge- Button text
A static property that holds the current theme color used across the checkout UI. Defaults to
HubtelColors.teal if not configured.Usage Example
Using with Brand Colors
Accessing Text Styles
You can access the predefined text styles through the statictextTheme property:
Default Theme
If noThemeConfig is provided to CheckoutScreen, the SDK uses the default Hubtel teal color:
Color Application
TheprimaryColor is applied to:
- Action buttons (pay, confirm, etc.)
- Loading indicators and progress bars
- Selected states and active elements
- Links and interactive elements
- Focus indicators