搜索插件、代码仓与 APP 分类

rating_dialog 封面
插件详情v2.0.4

rating_dialog

一个美观且可自定义的星评对话框 Flutter 包

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
2110
喜欢数
250
Pub 分数
150

安装插件

flutter pub add rating_dialog

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

一个视觉上吸引人且高度可定制的星评对话框,适用于Flutter应用。它使开发者能够轻松地将精美的评分提示集成到他们的应用中,让用户通过直观的星星选择来提供反馈。该对话框支持颜色、图标、文本和布局的自定义,确保与应用主题无缝集成。可在所有主要平台上使用,通过在关键时机提示评分来提升用户参与度。非常适合以非侵入性的方式收集用户反馈。

适合场景

  • 收集应用使用后的用户反馈
  • 任务完成后提示评分
  • 通过交互式对话提升用户参与度
  • 在移动和网页应用中集成反馈收集
  • 自定义评分 UI 以匹配应用品牌

主要特点

  • 可自定义的星星外观和颜色
  • 可配置的对话框标题和描述
  • 对多个平台的支持
  • 通过 pub.dev 轻松集成
  • 跨设备的响应式设计
  • 处理用户评分提交的选项

适合对象

  • 移动和网页应用开发者
  • 寻求用户反馈的应用程序
  • 需要精美用户界面组件的项目
  • 希望设置最少的开发者
  • 专注于用户体验的团队

使用建议

  • 可能需要额外的逻辑来保持评分持久性
  • 自定义样式可能需要平台特定的调整
  • 仅限星级评分
  • 无内置分析或数据跟踪
  • 依赖外部仓库进行更新

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

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!

所属分类

依赖

依赖清单 1 项

源码仓库

使用此插件的项目