Skip to content

Commit

Permalink
fix(android): system back button in player page exits the app
Browse files Browse the repository at this point in the history
  • Loading branch information
KRTirtho committed Feb 18, 2024
1 parent c3289a0 commit 3294f65
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/components/player/player.dart
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,10 @@ class PlayerView extends HookConsumerWidget {

final topPadding = MediaQueryData.fromView(View.of(context)).padding.top;

return PopScope(
canPop: false,
onPopInvoked: (didPop) async {
panelController.close();
return WillPopScope(
onWillPop: () async {
await panelController.close();
return false;
},
child: IconTheme(
data: theme.iconTheme.copyWith(color: bodyTextColor),
Expand Down

0 comments on commit 3294f65

Please sign in to comment.