Skip to content

Commit

Permalink
Use root navigator for modal
Browse files Browse the repository at this point in the history
  • Loading branch information
amantoux committed Dec 24, 2022
1 parent 389f2bc commit 6b14ba0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/src/widgets/wrapper.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class GiphySelector {
throw Exception('apiKey must be not null or not empty');
}
if (modalOptions != null) {
return Navigator.of(context).push(
return Navigator.of(context, rootNavigator: true).push(
RawDialogRoute(
barrierDismissible: true,
barrierColor: Colors.transparent,
Expand Down Expand Up @@ -121,7 +121,7 @@ class GiphySelector {
: null,
child: Container(
constraints:
const BoxConstraints(maxHeight: 400, maxWidth: 400),
const BoxConstraints(maxHeight: 400, maxWidth: 400),
color: Colors.red,
child: GiphySelectorModal(
apiKey: apiKey,
Expand Down

0 comments on commit 6b14ba0

Please sign in to comment.