SettingsController class

A class that many Widgets can interact with to read user settings, update user settings, or listen to user settings changes.

Controllers glue Data Services to Flutter Widgets. The SettingsController uses the SettingsService to store and retrieve user settings.

Mixed in types

Constructors

SettingsController(SettingsService _settingsService, ThemeMode _themeMode, SharedPreferences _sharedPreferences)

Properties

cardinalitySelection CardinalitySelection
no setter
hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
themeMode ThemeMode
no setter

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
dispose() → void
Discards any resources used by the object. After this is called, the object is not in a usable state and should be discarded (calls to addListener will throw after the object is disposed).
inherited
loadSettings() Future<void>
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.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
toString() String
A string representation of this object.
inherited
updateCardinalitySelection() Future<void>
Update and persist the cardinality settings based on the user's selection.
updateThemeMode(ThemeMode? newThemeMode) Future<void>
Update and persist the ThemeMode based on the user's selection.

Operators

operator ==(Object other) bool
The equality operator.
inherited