File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -825,6 +825,7 @@ mixin SchedulerBinding on BindingBase {
825
825
debugPrintStack (label: 'scheduleForcedFrame() called. Current phase is $schedulerPhase .' );
826
826
return true ;
827
827
}());
828
+ ensureFrameCallbacksRegistered ();
828
829
platformDispatcher.scheduleFrame ();
829
830
_hasScheduledFrame = true ;
830
831
}
Original file line number Diff line number Diff line change
1
+ // Copyright 2014 The Flutter Authors. All rights reserved.
2
+ // Use of this source code is governed by a BSD-style license that can be
3
+ // found in the LICENSE file.
4
+
5
+ import 'package:flutter/scheduler.dart' ;
6
+ import 'package:flutter/widgets.dart' ;
7
+ import 'package:flutter_test/flutter_test.dart' ;
8
+
9
+ void main () {
10
+ WidgetsFlutterBinding .ensureInitialized ();
11
+
12
+ test ('scheduleForcedFrame sets up frame callbacks' , () async {
13
+ SchedulerBinding .instance.scheduleForcedFrame ();
14
+ expect (SchedulerBinding .instance.platformDispatcher.onBeginFrame, isNotNull);
15
+ });
16
+ }
You can’t perform that action at this time.
0 commit comments