Skip to content

Latest commit

 

History

History
57 lines (43 loc) · 1.7 KB

README.md

File metadata and controls

57 lines (43 loc) · 1.7 KB

pub package

Smooth Flutter Rating Bar with SVG icons.

Android iOS Linux macOS Web Windows
Support SDK 16+ 9.0+ Any 10.11+ Any Windows 10+

Features

Set your own design as rating icons and color them.

Usage

To use this plugin, add smooth_rating_bar as a dependency in your pubspec.yaml file.

Then, you'll have to add to assets the corresponding files to full icon, half full icon, and empty icon:

assets:
  - assets/star/star.svg
  - assets/star/star_half.svg
  - assets/star/star_border.svg
  - assets/star/star_empty_gray.svg
double rating = 3.0;

SmoothRatingBar(
    rating: rating,
    starSize: 50,
    starCount: 5,
    color: Colors.yellow,
    borderColor: Colors.yellow,
    starPadding: const EdgeInsets.symmetric(horizontal: 7),
    onRatingCallback: (value) {
            setState(() {
                rating = value;
            });
        },
    ),