ThemeNotifier constructor

ThemeNotifier(
  1. NomoThemeDelegate<Object, Object> _delegate
)

Implementation

ThemeNotifier(this._delegate) {
  _colorThemes = _delegate.colorThemeMap;
  _sizingThemes = _delegate.sizingThemeMap;

  colorMode = _delegate.initialColorTheme();
  sizingMode = _sizingThemes.keys.first;

  _theme = NomoThemeData(
    colorTheme: _colorThemes[colorMode]!,
    sizingTheme: _sizingThemes.values.first,
    constants: _delegate.constants.componentConstants,
    textTheme: _delegate.typography,
  );

  _delegate
    ..onThemeChanged(theme, colorMode, sizingMode)
    ..onColorThemeChanged(_theme.colorTheme, colorMode)
    ..onSizingThemeChanged(_theme.sizingTheme, sizingMode);
}