utils/helpers
library
Functions
calculateEndRotate (RouletteGroup group , int targetIndex , bool clockwise , int minRotateCircles , {double offset = 0 })
→ double
Calculate the end rotate value by targetIndex.
The returned value contains the circles to roll.
Make sure when you run this method the group has at least one RouletteUnit .
hitTestSector ({required Size size , required RouletteGroup group , required double rotation , required Offset localPosition , double centerStickerPercent = 0 })
→ int ?
Determines which sector of a roulette the given localPosition falls in.
makeAnimation (AnimationController controller , double targetValue , Curve ? curve , {double initialValue = 0 })
→ Animation <double >
Make Animation from controller to begin rotate effect.
Rotate final position is targetValue.
makeInfiniteRollAnimation (AnimationController controller , {required bool clockwise , double initialValue = 0 , Curve ? curve })
→ Animation <double >
Make Animation from controller to begin infinite roll effect.