funwithflutter / flutter_confetti

A Flutter widget that shoots confetti all over the screen.
https://pub.dev/packages/confetti
MIT License
439 stars 79 forks source link

colors don't update #88

Open lukepighetti opened 1 year ago

lukepighetti commented 1 year ago

When theme brightness changes, the colors do not change

1. start in light mode
2. controller.play()
3. observe red
4. switch brightness to dark
5. controller.play()
6. observe red (expected blue) # <<<<<
return ConfettiWidget(
  colors: switch (Theme.of(context).brightness) {
    Brightness.light => [
        Colors.red,
      ],
    Brightness.dark => [
        Colors.blue,
      ],
  },
);