A beautiful and customizable Star Rating Dialog package for Flutter

Overview

rating_dialog

A beautiful and customizable Rating Dialog package for Flutter! Supports all platforms that flutter supports!

Import the rating_dialog package

To use the rating_dialog plugin, follow the plugin installation instructions.

Use the package

Add the following import to your Dart code:

import 'package:rating_dialog/rating_dialog.dart';

We use the flutter's showDialog function to show our Rating Dialog

    final _dialog = RatingDialog(
      initialRating: 1.0,
      // your app's name?
      title: Text(
        'Rating Dialog',
        textAlign: TextAlign.center,
        style: const TextStyle(
          fontSize: 25,
          fontWeight: FontWeight.bold,
        ),
      ),
      // encourage your user to leave a high rating?
      message: Text(
        'Tap a star to set your rating. Add more description here if you want.',
        textAlign: TextAlign.center,
        style: const TextStyle(fontSize: 15),
      ),
      // your app's logo?
      image: const FlutterLogo(size: 100),
      submitButtonText: 'Submit',
      commentHint: 'Set your custom comment hint',
      onCancelled: () => print('cancelled'),
      onSubmitted: (response) {
        print('rating: ${response.rating}, comment: ${response.comment}');

        // TODO: add your own logic
        if (response.rating < 3.0) {
          // send their comments to your email or anywhere you wish
          // ask the user to contact you instead of leaving a bad review
        } else {
          _rateAndReviewApp();
        }
      },
    );

    // show the dialog
    showDialog(
      context: context,
      barrierDismissible: true, // set to false if you want to force a rating
      builder: (context) => _dialog,
    );

Example

See the example application source for a complete sample app using the rating_dialog package.

Issues and feedback

Please file issues to send feedback or report a bug. Thank you!

Comments
  • Migrating onSubmitPressed to onSubmitted

    Migrating onSubmitPressed to onSubmitted

    I'm getting error when I migrated to onSubmitted

    The argument type 'Null Function(int)' can't be assigned to the parameter type 'dynamic Function(RatingDialogResponse)'.

           onSubmitted: (int rating) {
                print("onSubmitPressed: rating = $rating");
                AppReview.writeReview;
              },
        initState() {
        AppReview.getAppID.then((onValue) {
          setState(() {
            appID = onValue;
          });
          print("App ID" + appID);
        });
       }
    
    opened by zakblacki 3
  • Please add initialValue prop

    Please add initialValue prop

    I need to set the initial value of the rating, for example when user go back to the dialog in order update their rating, the stars show up with the initial value of their former rating. Thank you.

    opened by topex-psy 2
  • Error: Getter not found: 'context'.     context: context,

    Error: Getter not found: 'context'. context: context,

    void showRatingDialog() { final ratingDialog = RatingDialog( ratingColor: Colors.amber, title: 'Rate this app', message: "If you enjoy using this app, would you mind taking a moment to rate it? Thank you, for your support!", submitButton: 'Submit', onCancelled: () => print('cancelled'), onSubmitted: (response) { print('rating: ${response.rating}, '); print('comment: ${response.comment}'); }, );

    showDialog( context: context, //this line giving error. barrierDismissible: true, builder: (context) => ratingDialog,

    );

    opened by SmartAree 1
  • Hide comment hint after the field is focused

    Hide comment hint after the field is focused

    The UI is a bit confusing now as after tapping the comment field the hint is still displayed with a fairly visible color. I was literally hitting backspace trying to erase the hint text in order to write my comment.

    I would rather:

    • hide the hint when the field is in focus or
    • make the color more transparent so that it clearly indicates that it will go away when you start typing.
    opened by fotiDim 1
  • Layout overflow in small screens

    Layout overflow in small screens

    The RatingDialog widget is presenting an overflow in small screens. For instance, in screens of size 480x 800, we get a right overflow of 40 pixels in the stars icons, as shown below:

    Screenshot 2019-06-29 at 18 45 13
    opened by andre-paraense 1
  • Add option to disable comments

    Add option to disable comments

    I don't want my users to leave a comment. The comment is not carried to the App Store anyway so it would suck when they realize that they would have to type it again. In case comments are disabled it would also make sense to hide the submit button and accept the rating when a star is tapped. The native iOS rating dialog works in the same way.

    opened by fotiDim 0
  • added comment field and button for review

    added comment field and button for review

    Comment Added to package

    Hello Oliver ,I added to a comment Text field and and button with your viability rules . Awaiting Review ;changes . I hope this will fast track your package upgrade and and will possibly be implemented Flutter Version:1.22.1

    opened by davidAg9 0
  • Option to allow no rating

    Option to allow no rating

    Love the dialog, but would love a way to not force the user to give a rating but also just accept a comment. So an option for #16 would be amazing! Thank you!

    opened by clotodex 0
Owner
Oliver Martinez
Flutter + becoming Web3 dev! Syrius ZNN Address: z1qpjzv9humm37lk0wkq5l4m2vcpmxuwgtxn5fs2
Oliver Martinez
A simple ratingbar for flutter which also include a rating bar indicator, supporting any fraction of rating.

A simple yet fully customizable rating bar for flutter which also include a rating bar indicator, supporting any fraction of rating. Salient Features

Sarbagya Dhaubanjar 324 Dec 27, 2022
A new flutter package project which contains lots of beautiful alert dialog that will help you lot to create beautiful awesome alert box very quickly and easily.

A new flutter package project which contains lots of beautiful alert dialog that will help you lot to create beautiful awesome alert box very quickly and easily.

Karan Soni 8 Jan 8, 2022
Adaptive dialog - Show alert dialog or modal action sheet adaptively according to platform.

adaptive_dialog Show alert dialog or modal action sheet adaptively according to platform. showOkAlertDialog Convenient wrapper of showAlertDialog. iOS

Masayuki Ono (mono) 244 Dec 17, 2022
Venni partner app - A flutter ride-sharing driver app supporting bank transfer, balance history, trip rating system, and trip history,

partner_app A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if t

Abrantes 3 Sep 24, 2022
A Food Rating App Built Using Flutter

Food Rating App This app is called FoodReview. The main feature is we can discov

Codestronaut Hub 2 Apr 18, 2022
Flutter: Rating bottom sheet

Rating bottom sheet Features Getting started pubspec.yaml rating: <lastest version> Usage Implement the RatingController class PrintRatingController e

David Araujo 3 Aug 18, 2022
Movie Rating app with flutter Bloc patten

MOVIES. Movie Rating app with flutter Bloc patten Instruction Replace the api_key field with your own key, for key visit themoviedb.org and create you

Sanjay Soni 97 Jan 3, 2023
A Smooth rating bar

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

Thangmam 146 Sep 15, 2022
Show beautiful bottom sheet as confirmation dialog quickly and easily.

sweetsheet Show beautiful bottom sheet as confirmation dialog quickly and easily. nice warning success danger and since version 0.2.0 , it is fully cu

Ayao Corneille ALLOGBALO 80 Sep 27, 2022
Animated dialog box - A pure dart package for showing animated alert box.

animated_dialog_box A pure dart package for showing animated alert box. Getting Started https://github.com/Shubham-Narkhede/animated_dialog_box/blob/m

Shubham-Narkhede 10 Jul 24, 2022
This package will help you to manage the overlays in your projects. Show a dialog, notification, window, or a panel easily

This package will help you to manage the overlays in your projects. Show a dialog, notification, window, or a panel easily. or use one of the helping widgets like AutoComplete, Expander(Dropdown).

Schaban Bochi 25 Dec 4, 2022
Advanced & beautiful animations inspired by animate_do and Animate.css, every animation is a widget that contains default but customizable values πŸ’™

animate_it An animation package inspired by animate_do and Animate.css. Since the original animate_do is not being maintained, I have decided to creat

Luke Moody 3 Oct 1, 2022
Add beautiful animated effects & builders in Flutter, via an easy, highly customizable unified API.

Flutter Animate A performant library that makes it simple to add almost any kind of animated effect in Flutter. Pre-built effects, like fade, scale, s

Grant Skinner 352 Dec 25, 2022
A simple flutter app that downloads a file from the internet, shows a custom-made download progress dialog and saves the file to device's internal storage

http_downloader A simple flutter app that downloads a file from the internet using the http plugin. It has a custom-designed progress dialog which dis

Akora Ing. Debrah Kwesi Buabeng 4 Apr 6, 2021
Custom calendar dialog widget for flutter with (multi select, single select, date range) mode

some calendar Custom calendar with Multi-select & range configurable calendar New Features Added View Mode Somecalendar #15 Help Maintenance I've take

Irvan Lutfi Gunawan 69 Jan 3, 2023
A wrapper on top of alert dialog provided by flutter.

material_dialog A wrapper on top of alert dialog provided by flutter. Demo Use this package as a library 1. Depend on it Add this to your package's pu

Zubair Rehman 28 Aug 8, 2022
Dialog flowtter-master - A Flutter implementation of DialogFlow, improved

A Flutter implementation of DialogFlow, improved. Build your integrations with D

null 0 Jan 3, 2022
A Flutter implementation of Google's Dialog Flow improved

A Flutter implementation of DialogFlow, improved. Build your integrations with DialogFlow easier and faster. About the package Dialog Flow on Flutter,

Deimos 36 Oct 31, 2022