v2.0.4rating_dialog
Flutter용 아름답고 사용자 정의 가능한 별점 평가 대화 상자 패키지
250좋아요 2.1천30일 다운로드150Pub 점수
AndroidiOSWebmacOSWindowsLinux
Flutter용 아름답고 사용자 정의 가능한 별점 평가 대화 상자 패키지
아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.
A beautiful and customizable Rating Dialog package for Flutter! Supports all platforms that flutter supports!
To use the rating_dialog plugin, follow the plugin installation instructions.
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,
);
See the example application source for a complete sample app using the rating_dialog package.
Please file issues to send feedback or report a bug. Thank you!
의존성 목록 3 개
{"sdk":"flutter"}^4.0.0{"sdk":"flutter"}사용 목적에 따라 검색하고 개발 활동을 비교한 뒤 원본 저장소에서 요구 사항을 확인하세요.
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗