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

Show the tutorial on the rootNavigator #93

Closed
gianmarcocalbi opened this issue Oct 26, 2021 · 2 comments
Closed

Show the tutorial on the rootNavigator #93

gianmarcocalbi opened this issue Oct 26, 2021 · 2 comments

Comments

@gianmarcocalbi
Copy link

gianmarcocalbi commented Oct 26, 2021

Hello!

In my app, where I have a nested navigator, if I show the tutorial, the overlay is pushed on such navigator while I would like to have it shown on the root navigator to cover the whole screen.

The show function of the tutorial_coach_mark.dart is

  void show() {
    Future.delayed(Duration.zero, () {
      if (_overlayEntry == null) {
        _overlayEntry = _buildOverlay();
        Overlay.of(_context)?.insert(_overlayEntry!);
      }
    });
  }

in order to accomplish what I am looking for, it may be changed to

  void show({bool rootOverlay = false}) {
    Future.delayed(Duration.zero, () {
      if (_overlayEntry == null) {
        _overlayEntry = _buildOverlay();
        Overlay.of(_context, rootOverlay: rootOverlay)?.insert(_overlayEntry!);
      }
    });
  }

What do you think?
Thank you

@RafaelBarbosatec
Copy link
Owner

Good ideia!
I will add this suggestion!

@RafaelBarbosatec
Copy link
Owner

Available in 1.2.0 version.

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

No branches or pull requests

2 participants