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
1cb912e7
Unverified
Commit
1cb912e7
authored
Feb 05, 2022
by
ColdPaleLight
Committed by
GitHub
Feb 05, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make the application lifecycle does not affect `SchedulerBinding.scheduleForcedFrame`. (#97468)
parent
ce5fdff8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
8 deletions
+2
-8
binding.dart
packages/flutter/lib/src/scheduler/binding.dart
+0
-5
binding_test.dart
packages/flutter/test/widgets/binding_test.dart
+2
-3
No files found.
packages/flutter/lib/src/scheduler/binding.dart
View file @
1cb912e7
...
@@ -818,11 +818,6 @@ mixin SchedulerBinding on BindingBase {
...
@@ -818,11 +818,6 @@ mixin SchedulerBinding on BindingBase {
/// Consider using [scheduleWarmUpFrame] instead if the goal is to update the
/// Consider using [scheduleWarmUpFrame] instead if the goal is to update the
/// rendering as soon as possible (e.g. at application startup).
/// rendering as soon as possible (e.g. at application startup).
void
scheduleForcedFrame
()
{
void
scheduleForcedFrame
()
{
// TODO(chunhtai): Removes the if case once the issue is fixed
// https://github.com/flutter/flutter/issues/45131
if
(!
framesEnabled
)
return
;
if
(
_hasScheduledFrame
)
if
(
_hasScheduledFrame
)
return
;
return
;
assert
(()
{
assert
(()
{
...
...
packages/flutter/test/widgets/binding_test.dart
View file @
1cb912e7
...
@@ -177,10 +177,9 @@ void main() {
...
@@ -177,10 +177,9 @@ void main() {
tester
.
binding
.
scheduleFrame
();
tester
.
binding
.
scheduleFrame
();
expect
(
tester
.
binding
.
hasScheduledFrame
,
isFalse
);
expect
(
tester
.
binding
.
hasScheduledFrame
,
isFalse
);
// TODO(chunhtai): fix this test after workaround is removed
// https://github.com/flutter/flutter/issues/45131
tester
.
binding
.
scheduleForcedFrame
();
tester
.
binding
.
scheduleForcedFrame
();
expect
(
tester
.
binding
.
hasScheduledFrame
,
isFalse
);
expect
(
tester
.
binding
.
hasScheduledFrame
,
isTrue
);
await
tester
.
pump
();
int
frameCount
=
0
;
int
frameCount
=
0
;
tester
.
binding
.
addPostFrameCallback
((
Duration
duration
)
{
tester
.
binding
.
addPostFrameCallback
((
Duration
duration
)
{
...
...
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