dispose method
Implementation
Future<void> dispose() async {
if (_disposed) return;
final scanIds = _activeByApp.values.toList(growable: false);
_activeByApp.clear();
for (final scanId in scanIds) {
await _cancelBestEffort(scanId);
}
_disposed = true;
}