setTheme method
Switch to a named built-in or custom theme.
Throws ArgumentError if name does not match any registered theme.
Implementation
void setTheme(String name) {
final theme = NeomageThemes.all[name] ?? _customThemes[name];
if (theme == null) {
throw ArgumentError('Unknown theme: $name');
}
_currentTheme = theme;
_controller.add(_currentTheme);
}