AnimatedRatingBar constructor

const AnimatedRatingBar({
  1. Key? key,
  2. double? initialRating = 0.0,
  3. double? height,
  4. double? width,
  5. Color? activeFillColor,
  6. Color? strokeColor,
  7. required ValueChanged<double> onRatingUpdate,
  8. Color? animationColor,
})

AnimatedRatingBar can be used for rating which enhaces User Experince

by displaying beautiful animation like glows and sparks.

Exmple:

return AnimatedRatingBar(
         activeFillColor: Theme.of(context).colorScheme.inversePrimary,
         strokeColor: Theme.of(context).colorScheme.inversePrimary,
         initialRating: 0,
         height: 60,
         width: MediaQuery.of(context).size.width,
         animationColor: Theme.of(context).colorScheme.inversePrimary,
         onRatingUpdate: (rating) {
           debugPrint(rating.toString());
         },
       );

Implementation

const AnimatedRatingBar(
    {super.key,
    this.initialRating = 0.0,
    this.height,
    this.width,
    this.activeFillColor,
    this.strokeColor,
    required this.onRatingUpdate,
    this.animationColor});