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.

Classes

Priority
A task priority, as passed to SchedulerBinding.scheduleTask.
Ticker
Calls its callback once per animation frame. [...]
TickerFuture
An object representing an ongoing Ticker sequence. [...]
TickerProvider
An interface implemented by classes that can vend Ticker objects. [...]

Mixins

SchedulerBinding
Scheduler for running the following: [...]

Properties

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

Functions

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. [...]

Enums

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

Typedefs

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

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