Commit 8bb510e
Changed files (1)
app
lib
components
app/lib/components/bluetooth_input.dart
@@ -41,6 +41,14 @@ class _BluetoothInputState extends State<BluetoothInput> {
StreamSubscription<BluetoothState>? _bluetoothSubscription;
DeviceScanCubit? _deviceScanCubit;
+ @override
+ void dispose() {
+ _bluetoothSubscription?.cancel();
+ _bluetoothCubit.close();
+ _deviceScanCubit?.close();
+ super.dispose();
+ }
+
void _returnToIdle() {
_bluetoothSubscription?.cancel();
_bluetoothSubscription = null;