AppDrawer: Add a 'Rate us' button

This commit is contained in:
Vishesh Handa
2019-02-15 13:03:53 +01:00
parent e93e2a2b34
commit 9e5548dbc9
3 changed files with 17 additions and 0 deletions

View File

@ -1,5 +1,6 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:journal/state_container.dart'; import 'package:journal/state_container.dart';
import 'package:launch_review/launch_review.dart';
import 'package:share/share.dart'; import 'package:share/share.dart';
import 'package:url_launcher/url_launcher.dart'; import 'package:url_launcher/url_launcher.dart';
@ -57,6 +58,14 @@ class AppDrawer extends StatelessWidget {
), ),
ListTile( ListTile(
leading: Icon(Icons.feedback, color: textStyle.color), leading: Icon(Icons.feedback, color: textStyle.color),
title: Text('Rate Us', style: textStyle),
onTap: () {
LaunchReview.launch();
Navigator.pop(context);
},
),
ListTile(
leading: Icon(Icons.rate_review, color: textStyle.color),
title: Text('Feedback', style: textStyle), title: Text('Feedback', style: textStyle),
onTap: () { onTap: () {
var emailAddress = 'gitjournal.io@gmail.com'; var emailAddress = 'gitjournal.io@gmail.com';

View File

@ -226,6 +226,13 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.3.9+1" version: "0.3.9+1"
launch_review:
dependency: "direct main"
description:
name: launch_review
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.1"
logging: logging:
dependency: transitive dependency: transitive
description: description:

View File

@ -18,6 +18,7 @@ dependencies:
http: ^0.12.0+1 http: ^0.12.0+1
badges: ^0.0.6 badges: ^0.0.6
share: ^0.6.0+1 share: ^0.6.0+1
launch_review: ^1.0.1
dev_dependencies: dev_dependencies:
flutter_launcher_icons: "^0.7.0" flutter_launcher_icons: "^0.7.0"