Signal class
A EnhancedValueNotifier that holds a boolean value for signal. Useful implementation buffers pipelined listener pending a release signal.
- Inheritance
Constructors
- Signal()
- Creates a EnhancedValueNotifier that wraps boolean value, True in default.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
Override hasListeners to check if there are any listeners.
no setterinherited
-
properties
→ Map<
String, dynamic> -
A notifying map view for reading and writing property values by name.
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 -
Override dispose to 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
-
fromMap(
Map< String, dynamic> props) → void -
Initializes stored values from
propswithout notifying listeners.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 -
Returns a debug description containing this object's identity and value.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
-
operator [](
String target) → dynamic -
Returns the stored value for
target.inherited -
operator []=(
String target, dynamic value) → void -
Stores
valuefortargetand notifies listeners fortarget.inherited