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

Render a Flash behind a widget #13

Closed
AymanProjects opened this issue Jan 23, 2021 · 4 comments
Closed

Render a Flash behind a widget #13

AymanProjects opened this issue Jan 23, 2021 · 4 comments

Comments

@AymanProjects
Copy link

Is is possible to make a flash appears from behind a BottomNavigationBar ?

@sososdk
Copy link
Owner

sososdk commented Jan 25, 2021

Hi, @AymanProjects

Flash is displayed in an Overlay. Maybe you can use Overlay to wrap your widget which behind a BottomNavigationBar

Example:

Stack(
  children: [
    Overlay(
      initialEntries: [
        OverlayEntry(builder: (overlayContext) {
          return MyWidget(
            onTap: () {
              // show flash
              showFlash(context: overlayContext, ....);
            }
          );
        }),
      ],
    ),
  ],
  BottomNavigationBar(),
);

@AymanProjects
Copy link
Author

AymanProjects commented Jan 25, 2021

It did not work, it always paint on top of the navigationbar. Am I missing something?

Annotation 2021-01-25 081344

@sososdk
Copy link
Owner

sososdk commented Jan 25, 2021

@AymanProjects, try setting persistent to false.

showFlash(context: overlayContext, persistent: false, ......);

@AymanProjects
Copy link
Author

That worked Thanks! ♥

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