BankThemeDataApply extension

Extension on ThemeData for wiring a BankThemeData without a preset.

Use this together with BankThemeData.custom when you want full control over every token without starting from a built-in preset:

final myBankTheme = BankThemeData.custom(
  primary: const Color(0xFF0052CC),
  brightness: Brightness.light,
  cardRadius: const BorderRadius.all(Radius.circular(20)),
);

MaterialApp(
  theme: ThemeData.light(useMaterial3: true).withBankTheme(myBankTheme),
  darkTheme: ThemeData.dark(useMaterial3: true).withBankTheme(
    BankThemeData.custom(
      primary: const Color(0xFF4D9DFF),
      brightness: Brightness.dark,
    ),
  ),
);

withBankTheme registers bankTheme as a ThemeExtension and synchronises the Material ColorScheme to the bank theme's palette, so Material widgets and Bank UI Kit widgets stay visually consistent.

on

Methods

withBankTheme(BankThemeData bankTheme) ThemeData

Available on ThemeData, provided by the BankThemeDataApply extension

Returns a copy of this ThemeData with bankTheme registered as a ThemeExtension and the ColorScheme aligned to the bank theme's primary, surface and on-surface colours.