Skip to content

Commit

Permalink
fix: schedule frame
Browse files Browse the repository at this point in the history
  • Loading branch information
wssgcg1213 committed Apr 27, 2022
1 parent 8b28831 commit 50e396b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kraken/lib/src/dom/element.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1587,7 +1587,7 @@ abstract class Element
forceToRepaintBoundary = true;

Completer<Uint8List> completer = Completer();
SchedulerBinding.instance!.scheduleFrameCallback((_) async {
SchedulerBinding.instance!.addPostFrameCallback((_) async {
Uint8List captured;
RenderBoxModel _renderBoxModel = renderBoxModel!;

Expand All @@ -1605,6 +1605,7 @@ abstract class Element
// May be disposed before this callback.
flushLayout();
});
SchedulerBinding.instance!.scheduleFrame();

return completer.future;
}
Expand Down

0 comments on commit 50e396b

Please sign in to comment.