FlutterEffect class abstract

Interface for Flutter effects that schedule execution at frame end.

FlutterEffect is similar to Effect but schedules execution at the end of the current Flutter frame, batching multiple triggers within the same frame into a single execution. This is useful for UI-related side effects that should not interfere with frame rendering.

Example:

FlutterEffect effect = FlutterEffect(() {
  print('Count: ${count.value}');
});
effect.run(); // Manually trigger
effect.dispose(); // Stop the effect
Implemented types
Implementers

Constructors

FlutterEffect(void fn(), {bool lazy, bool? detach, JoltDebugOption? debug})
Creates a new Flutter effect with the given function.
factory
FlutterEffect.lazy(void fn(), {bool? detach, JoltDebugOption? debug})
Creates a new Flutter effect that does not run automatically upon creation.
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
isDisposed bool
Whether this node has been disposed.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

dispose() → void
Disposes this node and cleans up resources.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onCleanUp(Disposer fn) → void
Registers a cleanup function to be called when the effect is disposed or re-run.
run() → void
Manually runs the effect function immediately, bypassing frame scheduling.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited