loadSettings method

Future<void> loadSettings()

Load the user's settings from the SettingsService. It may load from a local database or the internet. The controller only knows it can load the settings from the service.

Implementation

Future<void> loadSettings() async {
  _themeMode = _settingsService.themeMode();

  // _cardinalitySelection = await _settingsService.cardinalitySelection();
  _cardinalitySelection = CardinalitySelection(
      _sharedPreferences.getBool("cardinality.singularEnabled") ?? true,
      _sharedPreferences.getBool("cardinality.pluralEnabled") ?? true);

  // Important! Inform listeners a change has occurred.
  notifyListeners();
}