sososdk / flash

⚡️A highly customizable, powerful and easy-to-use alerting library for Flutter.

Home Page:https://sososdk.github.io/flash

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Popup widgets are behind the flash widget

benedict1986 opened this issue · comments

commented

Hi @sososdk ,

Thank you for building such great tool. When I am using it (version ^2.0.3+1), I find that the popup widgets are behind the flash widget.

For example, I try to add a dropdown button in a context.showFlashDialog<T>, but the dropdown list is behind the dialog. I also use a date time picker in a bottom sheet, but the popup date time picker also behind the bottom sheet.

image

Here is the example code I am using

await showFlash(
      context: context,
      builder: (_, controller) {
        return Flash(
          controller: controller,
          behavior: FlashBehavior.fixed,
          position: FlashPosition.bottom,
          onTap: () => controller.dismiss(),
          forwardAnimationCurve: Curves.easeInCirc,
          reverseAnimationCurve: Curves.bounceIn,
          child: SomeWidgetIncludingTheDateTimePicker(),
        );

Can you please take a look and see if there is anything I missed.

Thank you

For this scenario, it is recommended to set persistent: false.

In this case, you must wrap you page with Overlay, see example.

Then call flash:

    context.showFlashDialog(
        persistent: false,
        ......
    );
commented

Thank you @sososdk. It's working.