Signal class
A EnhancedValueNotifier that holds a boolean value for signal. Useful implementation buffers pipelined listener pending a release signal.
- Inheritance
Constructors
- Signal.new()
- Creates a EnhancedValueNotifier that wraps boolean value, True in default.
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(
Function listener, {Object? target, bool once = false, bool immediate = false}) → void -
Register a listener for a specific property
target can be an element or elements list like [ property1, property2 ]
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
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners(
[String? target]) → void -
Notify listeners for a specific element
inherited
-
promise(
VoidCallback listener) → void - register a listener in promise's prototype consumed immediately or awaited once via Signal(True).
-
removeListener(
Function listener) → void -
Remove a listener
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited