init static method

Future<void> init({
  1. required List<AppTheme> themes,
})

Initializes the theme manager with supported themes

  1. Ensures Flutter binding is initialized
  2. Configures dependency injection container
  3. Retrieves initial theme using GetAppThemUseCase

Throws exceptions from dependency injection or theme loading

Implementation

static Future<void> init({required List<AppTheme> themes}) async {
  _appThemes = themes;
  WidgetsFlutterBinding.ensureInitialized();
  await AppThemeDependencyInjection.configure();
  _initialThemeData = themeLocator.get<GetAppThemUseCase>().execute(_appThemes);
}