handleScreencastFrameAck method

void handleScreencastFrameAck(
  1. Map<String, dynamic> params
)

Avoiding frame blocking, confirm frontend has ack last frame, and then send next frame.

Implementation

void handleScreencastFrameAck(Map<String, dynamic> params) {
  int? ackSessionID = params['sessionId'];
  if (ackSessionID == _lastSentSessionID && _isFramingScreenCast) {
    SchedulerBinding.instance!.addPostFrameCallback(_frameScreenCast);
  }
}