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> -
Define a map to hold all property values.
It's protected so only this class and subclasses can access it directly.
finalinherited
- 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
-
fromMap(
Map< String, dynamic> props) → void -
Initialize
propertieswith mapinherited -
getProperty(
String propertyName) → Object? -
Implement getProperty to return the value of a property by its name.
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