Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix BUG Overlay.of(context) return null #5

Merged
merged 1 commit into from Mar 25, 2022

Conversation

badlee
Copy link
Contributor

@badlee badlee commented Jan 10, 2021

Fix this bug

AchievementView(
    navigatorKey.currentState.context, // global navigator key
  // other options...
);
/* 
Throw NoSuchMethodError: The method 'insert' was called on null.
because Overlay.of(context)  return null
*/

with this option all is good

AchievementView(
    navigatorKey.currentState.context, // global navigator key
    overlay: navigatorKey.currentState.overlay,
  // other options...
);

Fix this bug
```dart
AchievementView(
    navigatorKey.currentState.context, // global navigator key
  // other options...
);
/* 
Throw NoSuchMethodError: The method 'insert' was called on null.
because Overlay.of(context)  return null
*/
``` 
with this option all is good
```dart
AchievementView(
    navigatorKey.currentState.context, // global navigator key
    overlay: navigatorKey.currentState.overlay,
  // other options...
);

```
@RafaelBarbosatec
Copy link
Owner

LGTM! Thanks for contribution !

@RafaelBarbosatec RafaelBarbosatec merged commit 3446640 into RafaelBarbosatec:master Mar 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants