scheduler library

The Flutter Scheduler library.

To use, import package:flutter/scheduler.dart.

This library is responsible for scheduler frame callbacks, and tasks at given priorities.

The library makes sure that tasks are only run when appropriate. For example, an idle-task is only executed when no animation is running.


A task priority, as passed to SchedulerBinding.scheduleTask.
Scheduler for running the following: [...]
Calls its callback once per animation frame. [...]
An object representing an ongoing Ticker sequence. [...]
An interface implemented by classes that can vend Ticker objects. [...]


debugPrintBeginFrameBanner bool
Print a banner at the beginning of each frame. [...]
read / write
debugPrintEndFrameBanner bool
Print a banner at the end of each frame. [...]
read / write
debugPrintScheduleFrameStacks bool
Log the call stacks that cause a frame to be scheduled. [...]
read / write
timeDilation double
Slows down animations by this factor to help in development.
read / write


debugAssertAllSchedulerVarsUnset(String reason) bool
Returns true if none of the scheduler library debug variables have been changed. [...]
defaultSchedulingStrategy({int priority, SchedulerBinding scheduler }) bool
The default SchedulingStrategy for SchedulerBinding.schedulingStrategy. [...]


States that an application can be in. [...]
The various phases that a SchedulerBinding goes through during SchedulerBinding.handleBeginFrame. [...]


FrameCallback(Duration timeStamp) → void
Signature for frame-related callbacks from the scheduler. [...]
SchedulingStrategy({int priority, SchedulerBinding scheduler }) bool
Signature for the SchedulerBinding.schedulingStrategy callback. Called whenever the system needs to decide whether a task at a given priority needs to be run. [...]
TaskCallback<T>() → T
Signature for Scheduler.scheduleTask callbacks. [...]
TickerCallback(Duration elapsed) → void
Signature for the callback passed to the Ticker class's constructor. [...]
VoidCallback() → void
Signature of callbacks that have no arguments and return no data.

Exceptions / Errors

Exception thrown by Ticker objects on the TickerFuture.orCancel future when the ticker is canceled.