JEffect<V> class
abstract
Base class representing a one-time UI side effect.
A JEffect encapsulates transient operations that the UI should handle,
such as showing a dialog, navigating to another screen, displaying a
snackbar/toast, or triggering animations.
These actions do not alter the main application state and are meant to be handled only once by the UI layer.
V represents the type of value that may be returned from the UI
when the side effect completes (e.g., user confirmed/canceled a dialog).
Example:
class ShowDialogEffect extends JEffect<bool> {
final String title;
ShowDialogEffect(this.title);
}
Constructors
- JEffect()
Properties
Methods
-
complete(
V value) → void - Completes the side effect with a value.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited