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

hashCode int
The hash code for this object.
no setterinherited
result Future<V>
A future that completes when the UI has handled the side effect.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

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