Skip to content

Commit

Permalink
Improved code
Browse files Browse the repository at this point in the history
  • Loading branch information
gokadzev committed Nov 28, 2023
1 parent 4e3483b commit 917ac4d
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -215,14 +215,8 @@ class _MusifyState extends State<Musify> {
],
supportedLocales: appSupportedLocales,
locale: locale,
home: WillPopScope(
onWillPop: () async {
if (_navigatorKey.currentState?.canPop() == true) {
_navigatorKey.currentState?.pop();
return false;
}
return true;
},
home: NavigatorPopHandler(
onPop: () => _navigatorKey.currentState!.pop(),
child: Scaffold(
body: Navigator(
key: _navigatorKey,
Expand Down

0 comments on commit 917ac4d

Please sign in to comment.