setTheme method

Future<void> setTheme(
  1. SBUTheme theme
)

Sets theme.

Implementation

Future<void> setTheme(SBUTheme theme) async {
  if (_theme != theme) {
    _theme = theme;
    await SBUPreferences().setDarkTheme(_theme == SBUTheme.dark);
    notifyListeners();
  }
}