handleDrawFrame method

  1. @override
void handleDrawFrame()

Called by the engine to produce a new frame.

This method is called immediately after handleBeginFrame. It calls all the callbacks registered by addPersistentFrameCallback, which typically drive the rendering pipeline, and then calls the callbacks registered by addPostFrameCallback.

See handleBeginFrame for a discussion about debugging hooks that may be useful when working with frame callbacks.


void handleDrawFrame() {
  assert(_doDrawThisFrame != null);
  if (_doDrawThisFrame!) {
  _doDrawThisFrame = null;
  _viewNeedsPaint = false;
  _expectingFrameToReassemble = false;
  if (_expectingFrame) { // set during pump
    assert(_pendingFrame != null);
    _pendingFrame!.complete(); // unlocks the test API
    _pendingFrame = null;
    _expectingFrame = false;
  } else if (framePolicy != LiveTestWidgetsFlutterBindingFramePolicy.benchmark) {