setTheme method

void setTheme({
  1. required T light,
  2. T? dark,
  3. bool notify = true,
})

Allows to set/change the entire theme. notify when set to true, will update the UI to use the new theme..

Implementation

void setTheme({
  required T light,
  T? dark,
  bool notify = true,
}) {
  _theme = light;
  if (dark != null) _darkTheme = dark;
  if (notify) updateState();
}