BrightnessNotifier class
Stores the current Brightness in a listenable object.
- Inheritance
-
- Object
- ChangeNotifier
- ValueNotifier<
Brightness> - BrightnessNotifier
- Available extensions
Constructors
- BrightnessNotifier(Brightness value)
-
Creates a notifier with the initial brightness
value.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
Whether any listeners are currently registered.
no setterinherited
- isDark → bool
-
Available on ValueNotifier<
Whether the current brightness is dark.Brightness> , provided by the BrightnessNotifierEx extensionno setter - isLight → bool
-
Available on ValueNotifier<
Whether the current brightness is light.Brightness> , provided by the BrightnessNotifierEx extensionno setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- value ↔ Brightness
-
The current value stored in this notifier.
getter/setter pairinherited
Methods
-
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object changes.
inherited
-
builder(
Widget builder(BuildContext context)) → Widget -
Available on Listenable, provided by the FHUListenableExtension extension
Creates a ListenableBuilder widget that listens to this Listenable. -
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
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners(
) → void -
Call all the registered listeners.
override
-
refresh(
) → void - Re-emits the current Brightness without changing it.
-
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that are
notified when the object changes.
inherited
-
setDark(
) → void -
Available on ValueNotifier<
Switches the notifier to Brightness.dark.Brightness> , provided by the BrightnessNotifierEx extension -
setDart(
) → void -
Available on ValueNotifier<
Deprecated typo kept for backward compatibility.Brightness> , provided by the BrightnessNotifierEx extension -
setLight(
) → void -
Available on ValueNotifier<
Switches the notifier to Brightness.light.Brightness> , provided by the BrightnessNotifierEx extension -
toString(
) → String -
A string representation of this object.
inherited
-
update(
Brightness newValue) → void - similar to value setter but this one force trigger the notifyListeners() event if newValue == value.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited