Skip to content

Enhancement: Add Scale-up Animation and Glow Color Restriction for Selected Star#101

Open
YuneshShrestha wants to merge 1 commit intosarbagyastha:mainfrom
YuneshShrestha:animation
Open

Enhancement: Add Scale-up Animation and Glow Color Restriction for Selected Star#101
YuneshShrestha wants to merge 1 commit intosarbagyastha:mainfrom
YuneshShrestha:animation

Conversation

@YuneshShrestha
Copy link
Copy Markdown

@YuneshShrestha YuneshShrestha commented Oct 18, 2023

This pull request introduces an enhancement to the codebase, addressing the following improvements:

  1. Scale-up Animation: I've incorporated a smooth scale-up animation to provide a more engaging visual feedback when users interact with the rating stars.
  2. Glow Color Restriction: I've limited the glowing effect to the star that is currently selected, offering a more intuitive and visually appealing rating experience.

Flexibility:
This feature is flexible.

code:


RatingBar(
          initialRating: 3,
          direction: Axis.horizontal,
          allowHalfRating: true,
          addScaleAnimation: true,
          itemCount: 5,
          ratingWidget: RatingWidget(
            full: Icon(Icons.star),
            half: Icon(Icons.star_half),
            empty: Icon(Icons.star_border),
          ),
          itemPadding: EdgeInsets.symmetric(horizontal: 4.0),
          glowColor: Colors.amberAccent,
          onRatingUpdate: (rating) {
            print(rating);
          },
        ),

Preview:

rating

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant