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.
Typedefs
-
FrameCallback(
Duration timeStamp) → void -
A frame-related callback 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.
-
TickerCallback(
Duration elapsed) → void -
Signature for the
onTick
constructor argument of the Ticker class. -
VoidCallback(
) → void -
Signature of callbacks that have no arguments and return no data.
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 - 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
- SchedulerPhase
-
The various phases that a SchedulerBinding goes through during SchedulerBinding.handleBeginFrame.
Classes
- Priority
-
A task priority, as passed to scheduleTask.
- SchedulerBinding
-
Scheduler for running the following:
- Ticker
-
Calls its callback once per animation frame.
- TickerProvider
-
An interface implemented by classes that can vend Ticker objects.