onDrawFrame property Null safety

VoidCallback? onDrawFrame

A callback that is invoked for each frame after onBeginFrame has completed and after the microtask queue has been drained.

This can be used to implement a second phase of frame rendering that happens after any deferred work queued by the onBeginFrame phase.

Implementation

VoidCallback? get onDrawFrame => _onDrawFrame;
void onDrawFrame=(VoidCallback? callback)

Implementation

set onDrawFrame(VoidCallback? callback) {
  _onDrawFrame = callback;
  _onDrawFrameZone = Zone.current;
}