BoolNotifier class
allows to quickly create a ValueNotifier of type bool.
- Inheritance
-
- Object
- ChangeNotifier
- ValueNotifier<
bool> - BoolNotifier
- Available extensions
Constructors
- BoolNotifier.new(bool initial)
Properties
- 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
- value ↔ bool
-
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. -
conditionalToggle(
{required bool condition}) → void -
Available on ValueNotifier<
toggle the value of the ValueNotifier based on a condition.bool> , provided by the FHUBoolValueNotifierExtension extension -
delayedToggle(
Duration delay) → Future< void> -
Available on ValueNotifier<
toggle after a specific time.bool> , provided by the FHUBoolValueNotifierExtension extension -
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 -
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that are
notified when the object changes.
inherited
-
setFalse(
) → void -
Available on ValueNotifier<
make the value of the ValueNotifier falsebool> , provided by the FHUBoolValueNotifierExtension extension -
setTrue(
) → void -
Available on ValueNotifier<
make the value of the ValueNotifier truebool> , provided by the FHUBoolValueNotifierExtension extension -
toggle(
) → void -
Available on ValueNotifier<
toggle the value of the ValueNotifierbool> , provided by the FHUBoolValueNotifierExtension extension -
toggleWithCallback(
VoidCallback callback) → void -
Available on ValueNotifier<
toggle the value of the ValueNotifier and run the provided function.bool> , provided by the FHUBoolValueNotifierExtension extension -
toString(
) → String -
A string representation of this object.
inherited
-
update(
bool newValue) → void - similar to value setter but this one force trigger the notifyListeners() event if newValue == value.
Operators
-
operator &(
bool other) → bool -
Available on ValueNotifier<
The logical conjunction ("and") of this andbool> , provided by the FHUBoolValueNotifierExtension extensionother
. -
operator ==(
Object other) → bool -
The equality operator.
inherited
-
operator ^(
bool other) → bool -
Available on ValueNotifier<
The logical exclusive disjunction ("exclusive or") of this andbool> , provided by the FHUBoolValueNotifierExtension extensionother
. -
operator |(
bool other) → bool -
Available on ValueNotifier<
The logical disjunction ("inclusive or") of this andbool> , provided by the FHUBoolValueNotifierExtension extensionother
.