Skip to content

Commit

Permalink
fix: disallow popping fatal dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
darylhjd committed Nov 6, 2021
1 parent a6af280 commit 7fd4e22
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions lib/models/spotify_controller_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,14 @@ class SpotifyControllerModel with ChangeNotifier {
clientId: Config.clientId, redirectUrl: Config.redirectUri);
} on PlatformException catch (e) {
showDialog(
context: this._ctx,
builder: (_) =>
FatalErrorDialog(title: "Uh oh!", message: e.toString()));
context: _ctx,
builder: (c) {
return WillPopScope(
onWillPop: () => Future.value(false),
child: FatalErrorDialog(title: "Uh oh!", message: e.toString()));
},
barrierDismissible: false,
);
}
}

Expand Down

0 comments on commit 7fd4e22

Please sign in to comment.