flutter_pannable_rating_bar library
Classes
- PannableRatingBar
-
A StatelessWidget rating bar that supports tap, pan (drag) and hover
events, with no limits on the value of
PannableRatingBar.rate
. The value is distributed to each RatingWidget.child respectively. The value is reported through the PannableRatingBar.onChanged callback for tap or drag event and can be used as desired. Similarly, the value is reported through the PannableRatingBar.onHover callback for hover event and can be used as desired. This widget uses Flutter's Wrap layout and supports all its properties. For more information on these properties, refer to the Wrap documentation. It also takes Wrap.textDirection and Wrap.verticalDirection into account during drawing. - RatingWidget
- Configuration for widget used as a rate widget.
Enums
- GestureType
- The GestureType enumeration provides a way to specify the type of gesture used to interact with the PannableRatingBar.onChanged callback. When set to GestureType.tapOnly, only tap events are accepted. Similarly, when set to GestureType.dragOnly. only drag events are accepted. On the other hand, when set to GestureType.tapAndDrag, both tap and drag events are supported.
Functions
-
halfFractionalValueTransformer(
double value) → double - RatingValueTransformer that will round the rating value to nearest .5.
-
rawValueTransformer(
double value) → double - RatingValueTransformer that will leave the rating value as is.
-
singleFractionalValueTransformer(
double value) → double - RatingValueTransformer that will round the rating value to the nearest single fractional digit.
Typedefs
- IndexedRatingWidgetBuilder = RatingWidget Function(BuildContext, int)
- Signature for function that return a RatingWidget, used in PannableRatingBar.builder
- RatingValueTransformer = double? Function(double value)
- Signature for function that will perform mutate / transform operations on the output rating value. Return null here will cause callbacks to be skipped.