Search packages, repositories and app categories

smooth_star_rating_null_safety cover
Package detailsv1.0.4+2

smooth_star_rating_null_safety

A smooth rating bar

AndroidiOSWebmacOSWindowsLinux
30-day downloads
12
Likes
38
Pub points
130

Install package

flutter pub add smooth_star_rating_null_safety

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

A smooth rating bar widget for Flutter that provides a visually appealing and interactive star-based rating system. Designed with null safety, it ensures reliable performance across all platforms including Android, iOS, Web, macOS, Windows, and Linux. The package offers customizable star appearance, smooth animations during rating changes, and supports both interactive and read-only modes. It's ideal for user feedback forms, product reviews, and app ratings. The clean API makes integration simple and efficient.

Use cases

  • User reviews and feedback
  • Product rating systems
  • App review interfaces
  • Interactive form elements
  • Rating collection in surveys

Key features

  • Smooth animation on rating change
  • Customizable star size and color
  • Null-safe implementation
  • Supports both interactive and non-interactive modes
  • Cross-platform compatibility

Suitable for

  • Developers building feedback forms
  • Apps requiring intuitive rating input
  • Projects targeting multiple platforms
  • UI-focused applications
  • Flutter beginners seeking simple widgets

Considerations

  • Requires manual handling of rating value updates
  • Limited to star-based ratings
  • No built-in validation
  • Best suited for single-rating scenarios
  • May need additional styling for complex UIs

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

This is the null safety version of smooth_star_rating

All the credits go to the original authors,

You can find the original package here

https://pub.dev/packages/smooth_star_rating

A Star rating with touch and swipe rate enabled

  • Supports replacing default star icons with desired IconData
  • Supports half rate and full rate (1.0 or 0.5)
  • Swipe for incrementing/decrementing rate amount
  • Change star body and boundary colors independently
  • Control size of the star rating
  • Set your desired total Star count
  • Supports click-to-rate
  • Spacing between stars

Getting Started

In your flutter project add the dependency:

    dependencies:
        ...
        smooth_star_rating: 1.0.4+2

Usage example

import 'package:smooth_star_rating/smooth_star_rating.dart'; 
SmoothStarRating(
          allowHalfRating: false,
          onRatingChanged: (v) {
            rating = v;
            setState(() {});
          },
          starCount: 5,
          rating: rating,
          size: 40.0,
          filledIconData: Icons.blur_off,
          halfFilledIconData: Icons.blur_on,
          color: Colors.green,
          borderColor: Colors.green,
          spacing:0.0
        )

Constructor parameters

allowHalfRating                 -   Whether to use whole number for rating(1.0  or 0.5)
onRatingChanged(int rating)     -   Rating changed callback
starCount                       -   The maximum amount of stars
rating                          -   The current value of rating
size                            -   The size of a single star
color                           -   The body color of star
borderColor                     -   The border color of star
spacing                         -   Spacing between stars(default is 0.0)
filledIconData                  -   Full Rated Icon
halfFilledIconData              -   Half Rated Icon
defaultIconData                 -   Default Rated Icon
Screenshots
Full Rating

alt text

Half Rating

alt text

MIT LICENSE
Let me know if you find any bugs/issues.Thanks.

Categories

Source repository

Projects using this package