Commit 0f6e90c

derdilla <82763757+NobodyForNothing@users.noreply.github.com>
2024-05-18 07:21:54
dispose cubits
Signed-off-by: derdilla <82763757+NobodyForNothing@users.noreply.github.com>
1 parent 01c16d8
Changed files (1)
app
lib
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;