FutureBlock class
Works similarly to Future.delayed(duration), but completion callback can be postponed. Can be re-triggered multiple times - only last call will be handled.
Constructors
- FutureBlock()
- Default constructor.
Properties
Methods
-
cancel(
) → void - Cancels current delay action.
-
delayed(
Duration duration, VoidCallback? onDone) → void -
Starts delay for given
duration
. Given callback can be postponed or canceled. Can be called multiple times - only last call will be handled. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
postpone(
Duration duration) → bool -
Re-trigger current delay action and sets new
duration
, but block is postponed only when current delay isActive. Can be called multiple times - only last call will be handled. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
nextFrame(
VoidCallback action) → Future -
Runs delayed Future with zero Duration so
action
will be performed next frame. -
wait(
Iterable< Future?> futures) → Future - Same as Future.wait but nullable.