Update confetti + next page when select

This commit is contained in:
Fransolet Thomas 2022-03-24 00:01:25 +01:00
parent 792d43e931
commit 0dd47e3076

View File

@ -191,13 +191,12 @@ class _QuizzViewWidget extends State<QuizzViewWidget> {
confettiController: _controllerCenter, confettiController: _controllerCenter,
blastDirectionality: BlastDirectionality blastDirectionality: BlastDirectionality
.explosive, // don't specify a direction, blast randomly .explosive, // don't specify a direction, blast randomly
shouldLoop: shouldLoop: true, // start again as soon as the animation is finished
true, // start again as soon as the animation is finished
colors: const [ colors: const [
Colors.red, Colors.red,
Colors.pink, //Colors.pink,
Colors.orange, //Colors.orange,
Colors.purple //Colors.purple
], // manually specify the colors to be used ], // manually specify the colors to be used
createParticlePath: drawStar, // define a custom shape/path. createParticlePath: drawStar, // define a custom shape/path.
), ),
@ -327,6 +326,8 @@ class _QuizzViewWidget extends State<QuizzViewWidget> {
{ {
showResult = true; showResult = true;
_controllerCenter.play(); _controllerCenter.play();
} else {
sliderController.nextPage(duration: new Duration(milliseconds: 650), curve: Curves.fastOutSlowIn);
} }
}); });
}, },