Skip to content

Commit

Permalink
Remove state after disconnect exception
Browse files Browse the repository at this point in the history
  • Loading branch information
ju4n97 committed Dec 4, 2023
1 parent 75e4d5f commit 98413be
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/src/screens/home_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -228,14 +228,17 @@ class _HomeScreenState extends State<HomeScreen> {
}

prefs.remove('pairingKey');

_resetState();
} catch (error) {
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: Text(error.toString()),
),
);

final prefs = await SharedPreferences.getInstance();
prefs.remove('pairingKey');
_resetState();
}
}

Expand Down

0 comments on commit 98413be

Please sign in to comment.