BrightnessNotifier class

Stores the current Brightness in a listenable object.

Inheritance
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<Brightness>, provided by the BrightnessNotifierEx extension

Whether the current brightness is dark.
no setter
isLight bool

Available on ValueNotifier<Brightness>, provided by the BrightnessNotifierEx extension

Whether the current brightness is light.
no 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<Brightness>, provided by the BrightnessNotifierEx extension

Switches the notifier to Brightness.dark.
setDart() → void

Available on ValueNotifier<Brightness>, provided by the BrightnessNotifierEx extension

Deprecated typo kept for backward compatibility.
setLight() → void

Available on ValueNotifier<Brightness>, provided by the BrightnessNotifierEx extension

Switches the notifier to Brightness.light.
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