ThemeService constructor

ThemeService({
  1. required ConfigService configService,
  2. required ThemeConfigOptions config,
})

Implementation

ThemeService(
    {required ConfigService configService,
    required ThemeConfigOptions config}) {
  _configService = configService;
  themeConfig = ThemeConfig(config: config);

  themeMode = Rx<ThemeMode>(configService.item.theme);
  primaryColor = Rx<Color>(config.primaryColor);

  lightTheme = Rx<ThemeData>(
      themeConfig.theme(isDark: false, color: config.primaryColor));
  darkTheme = Rx<ThemeData>(
      themeConfig.theme(isDark: true, color: config.primaryColor));
}