resetFetchState method

  1. @override
void resetFetchState(
  1. BluetoothDevice device
)
override

Resets the fetch state for a device, canceling any in-progress fetch.

Implementation

@override
void resetFetchState(BluetoothDevice device) {
  final deviceId = device.remoteId.str;
  _downloadSubscriptions[deviceId]?.cancel();
  _downloadSubscriptions.remove(deviceId);
  _expectedCrcByDevice.remove(deviceId);
  _fetchRegistry.getManager(device).reset();
}