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

Set optional generic type on Pop and MaybePop #486

Merged
merged 1 commit into from Aug 2, 2021

Conversation

reeichert
Copy link

This PR is a fix on Modular Navigator interface, to support optional generic type on Modular.to.pop() and Modular.to.maybePop() to match Navigator's methods.

before:

final String? foo = null;
Modular.to.pop(foo) // Error!, Tried to infer 'Null' for 'T' which doesn't work..

after:

final String? foo = null;
Modular.to.pop(foo) // Works!

@jacobaraujo7 jacobaraujo7 merged commit 0bbf975 into Flutterando:master Aug 2, 2021
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