rate_in_stars 0.0.3 copy "rate_in_stars: ^0.0.3" to clipboard
rate_in_stars: ^0.0.3 copied to clipboard

A Flutter package to rate items in stars. The stars can be editable if the user inputs the rating, or non editable if you only want to display the rating to the user. The stars colour and size can be [...]

Rate In Stars #

A Flutter package to rate items in stars. The stars can be editable if the user inputs the rating, or non editable if you only want to display the rating to the user.

Installation #

  1. Add the latest version of package to your pubspec.yaml (and run 'dart pub get'):
dependencies:
    rate_in_stars: ^0.0.3
  1. Import the package and use it in your Flutter app.
import 'package:rate_in_stars/rate_in_stars.dart';

Usage #

The rating can be editable - dynamic, or non editable - static. <img src="https://github.com/SamiaTheDev/RateInStarsFiles/blob/main/Screenshot%202021-11-27%20at%201.10.49%20PM.png?raw=true alt="" > <img src="https://github.com/SamiaTheDev/RateInStarsFiles/blob/main/Screenshot%202021-11-27%20at%201.12.17%20PM.png?raw=true alt="" >

Example #

There are a number of properties that you can modify:

  • rating
  • editable
  • iconSize
  • color
class RatingStarsWidget extends StatelessWidget {
  const RatingStarsWidget({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: RatingStars(
        editable: true,
        rating: 3.5,
        color: Colors.amber,
        iconSize: 32,
      ),
    );
  }
}

Next Steps #

  • Accept different icon types
  • Edit with decimal values
18
likes
120
pub points
82%
popularity

Publisher

unverified uploader

A Flutter package to rate items in stars. The stars can be editable if the user inputs the rating, or non editable if you only want to display the rating to the user. The stars colour and size can be modified. Use this package to let your app users know the rating of an item. Simple and straightforward to use. Supports rating in decimals for fine control of the data.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (LICENSE)

Dependencies

flutter, flutter_hooks

More

Packages that depend on rate_in_stars