funwithflutter/flutter_confetti

Displaying it over a dialog

Opened this issue ยท 3 comments

This is lovely! Is there any way to get the confetti displaying over a dialog?

Sorry for the late reply. I believe this should be possible. Take a look at Flutter overlays - https://api.flutter.dev/flutter/widgets/Overlay-class.html

If I have time in the future I might update the package to include overlays by default. But for now, it might be possible to create your own overlay.

Stack(
      children: [
        Dialog(),
        Align(child: ConfettiWidget()),
      ],
)

I was looking for something like this too. I wrote a function that would achieve this that is similar to showDialog. I call it showConfettiDialog.

https://gist.github.com/derekedelaney/0bd36b370daceaf56712a22bd097cdc8