completeFetchWithData method

void completeFetchWithData({
  1. required Uint8List data,
  2. required bool crcValid,
})

Manually complete the fetch with processed data.

Called by the datasource after processing the raw data.

Implementation

void completeFetchWithData({
  required Uint8List data,
  required bool crcValid,
}) {
  if (!isActive) return;

  isActive = false;
  emitProgress(FetchProgress.completed(
    data: data,
    totalBytes: data.length,
    crcValid: crcValid,
  ));
}