Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
4f6c2ccc
Unverified
Commit
4f6c2ccc
authored
Oct 17, 2023
by
Todd Volkert
Committed by
GitHub
Oct 17, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add docs to SchedulerBinding (#136433)
Add documentation that I went looking for and didn't find :-)
parent
0acd1f21
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
+20
-0
binding.dart
packages/flutter/lib/src/scheduler/binding.dart
+20
-0
No files found.
packages/flutter/lib/src/scheduler/binding.dart
View file @
4f6c2ccc
...
...
@@ -559,6 +559,11 @@ mixin SchedulerBinding on BindingBase {
/// Adds the given callback to the list of frame callbacks and ensures that a
/// frame is scheduled.
///
/// If this is called during the frame's animation phase (when transient frame
/// callbacks are still being invoked), a new frame will be scheduled, and
/// `callback` will be called in the newly scheduled frame, not in the current
/// frame.
///
/// If this is a one-off registration, ignore the `rescheduling` argument.
///
/// If this is a callback that will be re-registered each time it fires, then
...
...
@@ -573,6 +578,12 @@ mixin SchedulerBinding on BindingBase {
///
/// Callbacks registered with this method can be canceled using
/// [cancelFrameCallbackWithId].
///
/// See also:
///
/// * [WidgetsBinding.drawFrame], which explains the phases of each frame
/// for those apps that use Flutter widgets (and where transient frame
/// callbacks fit into those phases).
int
scheduleFrameCallback
(
FrameCallback
callback
,
{
bool
rescheduling
=
false
})
{
scheduleFrame
();
_nextFrameCallbackId
+=
1
;
...
...
@@ -725,6 +736,12 @@ mixin SchedulerBinding on BindingBase {
///
/// Persistent frame callbacks cannot be unregistered. Once registered, they
/// are called for every frame for the lifetime of the application.
///
/// See also:
///
/// * [WidgetsBinding.drawFrame], which explains the phases of each frame
/// for those apps that use Flutter widgets (and where persistent frame
/// callbacks fit into those phases).
void
addPersistentFrameCallback
(
FrameCallback
callback
)
{
_persistentCallbacks
.
add
(
callback
);
}
...
...
@@ -752,6 +769,9 @@ mixin SchedulerBinding on BindingBase {
///
/// * [scheduleFrameCallback], which registers a callback for the start of
/// the next frame.
/// * [WidgetsBinding.drawFrame], which explains the phases of each frame
/// for those apps that use Flutter widgets (and where post frame
/// callbacks fit into those phases).
void
addPostFrameCallback
(
FrameCallback
callback
)
{
_postFrameCallbacks
.
add
(
callback
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment