onBeginFrame property

FrameCallback? onBeginFrame

A callback invoked when any view begins a frame.

A callback that is invoked to notify the application that it is an appropriate time to provide a scene using the SceneBuilder API and the FlutterView.render method.

When possible, this is driven by the hardware VSync signal of the attached screen with the highest VSync rate. This is only called if PlatformDispatcher.scheduleFrame has been called since the last time this callback was invoked.

Implementation

FrameCallback? get onBeginFrame => _onBeginFrame;
void onBeginFrame=(FrameCallback? callback)

Implementation

set onBeginFrame(FrameCallback? callback) {
  _onBeginFrame = callback;
  _onBeginFrameZone = Zone.current;
}