mirror of
https://github.com/flutter/flutter
synced 2024-10-02 22:44:13 +00:00
Make the application lifecycle does not affect SchedulerBinding.scheduleForcedFrame
. (#97468)
This commit is contained in:
parent
ce5fdff8b0
commit
1cb912e75c
|
@ -818,11 +818,6 @@ mixin SchedulerBinding on BindingBase {
|
|||
/// Consider using [scheduleWarmUpFrame] instead if the goal is to update the
|
||||
/// rendering as soon as possible (e.g. at application startup).
|
||||
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)
|
||||
return;
|
||||
assert(() {
|
||||
|
|
|
@ -177,10 +177,9 @@ void main() {
|
|||
tester.binding.scheduleFrame();
|
||||
expect(tester.binding.hasScheduledFrame, isFalse);
|
||||
|
||||
// TODO(chunhtai): fix this test after workaround is removed
|
||||
// https://github.com/flutter/flutter/issues/45131
|
||||
tester.binding.scheduleForcedFrame();
|
||||
expect(tester.binding.hasScheduledFrame, isFalse);
|
||||
expect(tester.binding.hasScheduledFrame, isTrue);
|
||||
await tester.pump();
|
||||
|
||||
int frameCount = 0;
|
||||
tester.binding.addPostFrameCallback((Duration duration) {
|
||||
|
|
Loading…
Reference in a new issue