flutter_rating_bar 1.3.0+1 copy "flutter_rating_bar: ^1.3.0+1" to clipboard
flutter_rating_bar: ^1.3.0+1 copied to clipboard

outdated

A simple yet fully customizable ratingbar for flutter which also include a rating bar indicator, supporting any fraction of rating.

Flutter Rating Bar #

Pub License Download GitHub code size in bytes GitHub stars

A simple yet fully customizable rating bar for flutter which also include a rating bar indicator, supporting any fraction of rating.

DEMO

Usage #

Using Flutter Rating Bar

FlutterRatingBar(
      initialRating: 3,
      fillColor: Colors.amber,
      borderColor: Colors.amber.withAlpha(50),
      allowHalfRating: true,
      onRatingUpdate: (rating) {
           print(rating);
      },
),

Using Flutter Rating Bar Indicator

FlutterRatingBarIndicator(
     rating: 2.75,
     itemCount: 5,
     itemSize: 50.0,
     emptyColor: Colors.amber.withAlpha(50),
),

In order to make the indicator scrollable, just use 'physics' property as in the example.

Customize Rating Bar Indicator #

CUSTOM_DEMO

FlutterRatingBar(
     initialRating: 2.87,
     allowHalfRating: true,
     itemPadding: EdgeInsets.symmetric(horizontal: 4.0),
     fullRatingWidget: _image("assets/heart.png") ,
     halfRatingWidget: _image("assets/heart_half.png"),
     noRatingWidget: _image("assets/heart_border.png"),
     onRatingUpdate: (rating) {
         print(rating);
     },
),

Widget _image(String asset) {
    return Image.asset(
      asset,
      height: 30.0,
      width: 30.0,
      color: Colors.amber,
    );
}

Heart Icons are Available Here.

Customize Rating Bar #

CUSTOM_DEMO

FlutterRatingBarIndicator(
    rating: _userRating,
    pathClipper: DiamondClipper(),
    itemCount: 5,
    itemSize: 50.0,
    emptyColor: Colors.amber.withAlpha(50),
),

class DiamondClipper extends CustomClipper<Path> {...}

DiamondClipper can be found here.

Info #

To know more about the available properties, head on to api docs.

Feel Free to request any missing features or report issues here.

License #

Copyright (c) 2019 Sarbagya Dhaubanjar

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
2147
likes
40
pub points
100%
popularity

Publisher

verified publishersarbagyastha.com.np

A simple yet fully customizable ratingbar for flutter which also include a rating bar indicator, supporting any fraction of rating.

Repository (GitHub)
View/report issues

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on flutter_rating_bar