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

Open dialogs without using root navigator #12

Merged
merged 1 commit into from Jul 18, 2021

Conversation

erdemyerebasmaz
Copy link
Contributor

@erdemyerebasmaz erdemyerebasmaz commented Feb 2, 2021

Dialogs use root navigator by default. This causes issues when the plugin is opened through an app with it's own instance of Navigator. The dialogs should be pushed to the nearest Navigator from the context in this case.

For example:

  • The plugin is embedded into an app,
  • a dialog that belongs to the plugin is opened,
  • calling Navigator.pop(context) to close the dialog would pop the last item on app's Navigator instead of popping the dialog.

@amugofjava
Copy link
Owner

Hi @erdemyerebasmaz. The showPlatformDialog comes from a small wrapper library that displays an appropriate dialog depending on whether you are running on Android or iOS. By switching it back to showDialog it makes it Android only. I will raise a PR with the library author and as if the useRootNavigator property can be passed through.

@amugofjava amugofjava self-assigned this Feb 14, 2021
@amugofjava amugofjava added the on hold On hold until dependant issue is resolved label Feb 21, 2021
@erdemyerebasmaz
Copy link
Contributor Author

Hi @erdemyerebasmaz. The showPlatformDialog comes from a small wrapper library that displays an appropriate dialog depending on whether you are running on Android or iOS. By switching it back to showDialog it makes it Android only. I will raise a PR with the library author and as if the useRootNavigator property can be passed through.

I've opened the PR.

@erdemyerebasmaz
Copy link
Contributor Author

erdemyerebasmaz commented Jun 11, 2021

The PR I opened for wrapper library is merged.
I will resolve conflicts and use the useRootNavigator parameter via wrapper libraries showDialog method when I'm available.

@erdemyerebasmaz
Copy link
Contributor Author

@amugofjava All dialogs now use showPlatformDialog with useRootNavigator parameter set to false.

@amugofjava
Copy link
Owner

Thanks @erdemyerebasmaz,

Will work on merging these in once I have finished the episode auto-update work. Cheers.

@amugofjava amugofjava merged commit e1c4e09 into amugofjava:master Jul 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
on hold On hold until dependant issue is resolved
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants