useTimeout function

TimeoutState useTimeout(
  1. Duration delay
)

Re-builds the component after a specified duration. Provides handles to cancel and/or reset the timeout.

Implementation

TimeoutState useTimeout(Duration delay) {
  final update = useUpdate();
  return useTimeoutFn(update, delay);
}