rate 0.0.2 copy "rate: ^0.0.2" to clipboard
rate: ^0.0.2 copied to clipboard

A simple star rating compnent

Rate #

A simple star rating compnent

Getting Started #

In the pubspec.yaml of your flutter project, add the following dependency:

dependencies:
  rate: ^0.0.1

Import it:

import 'package:rate/rate.dart';

Examples #

Examples

Basic Rate Component #

const Rate()

Change size, color and click behaviors #

Rate(
    iconSize: 40,
    color: Colors.green,
    allowHalf: true,
    allowClear: true,
    initialValue: 3.5,
    readOnly: false,
    onChange: (value) => print(value),
),

Examples

Fully customize icon #

Rate(iconBuilder: _customIconBuilder),

Icon _customIconBuilder(double value, int index) {
    var icon =
        value > index.toDouble() ? Icons.favorite : Icons.favorite_border;

    return Icon(icon, color: Colors.red);
}
12
likes
150
pub points
85%
popularity

Publisher

unverified uploader

A simple star rating compnent

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on rate