Skip to content

Commit

Permalink
simplify toggle switch logic
Browse files Browse the repository at this point in the history
  • Loading branch information
muzzammilshahid committed Jun 6, 2024
1 parent fd50648 commit 6b96671
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/screens/mobile/mobile_home.dart
Original file line number Diff line number Diff line change
Expand Up @@ -244,10 +244,9 @@ class _MobileHomeScaffoldState extends State<MobileHomeScaffold> with TickerProv
scaffoldMessenger.showSnackBar(SnackBar(content: Text("An error occurred. Please try again. $e")));
}

if (!routerResult.isServerStarted) {
return;
if (routerResult.isServerStarted) {
routerResult.toggleSwitch(value: true);
}
routerResult.toggleSwitch(value: true);
}

Future<void> _showCloseRouterDialog(
Expand Down

0 comments on commit 6b96671

Please sign in to comment.