Themed constructor

Themed({
  1. Key? key,
  2. Map<ThemeRef, Object>? defaultTheme,
  3. Map<ThemeRef, Object>? currentTheme,
  4. required Widget child,
})

The Themed widget should wrap the child which contains the tree of widgets you want to use the color theme. It' recommended that you provide a defaultTheme.

Implementation

Themed({
  Key? key,
  Map<ThemeRef, Object>? defaultTheme,
  Map<ThemeRef, Object>? currentTheme,
  required this.child,
}) : super(key: _themedKey) {
  if (defaultTheme != null) _defaultTheme = toIdenticalKeyedMap(defaultTheme);
  if (currentTheme != null) _currentTheme = toIdenticalKeyedMap(currentTheme);
}