|
|
|
|
@ -34,6 +34,7 @@ import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
import 'package:flutter_svg/flutter_svg.dart';
|
|
|
|
|
import 'package:in_app_review/in_app_review.dart';
|
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
|
import 'package:url_launcher/url_launcher.dart';
|
|
|
|
|
|
|
|
|
|
@ -47,6 +48,7 @@ class AppDrawer extends StatefulWidget {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class _AppDrawerState extends State<AppDrawer> {
|
|
|
|
|
final InAppReview _inAppReview = InAppReview.instance;
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
void initState() {
|
|
|
|
|
@ -377,11 +379,12 @@ class _AppDrawerState extends State<AppDrawer> {
|
|
|
|
|
InkWell(
|
|
|
|
|
child: DrawerItem(TranslationBase.of(context).rateApp, Icons.star, bottomLine: false, letterSpacing: -0.84, fontSize: 14, projectProvider: projectProvider),
|
|
|
|
|
onTap: () {
|
|
|
|
|
if (Platform.isIOS) {
|
|
|
|
|
launch("https://apps.apple.com/sa/app/dr-suliaman-alhabib/id733503978");
|
|
|
|
|
} else {
|
|
|
|
|
launch("https://play.google.com/store/apps/details?id=com.ejada.hmg&hl=en");
|
|
|
|
|
}
|
|
|
|
|
openAppReviewDialog();
|
|
|
|
|
// if (Platform.isIOS) {
|
|
|
|
|
// launch("https://apps.apple.com/sa/app/dr-suliaman-alhabib/id733503978");
|
|
|
|
|
// } else {
|
|
|
|
|
// launch("https://play.google.com/store/apps/details?id=com.ejada.hmg&hl=en");
|
|
|
|
|
// }
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
InkWell(
|
|
|
|
|
@ -607,6 +610,12 @@ class _AppDrawerState extends State<AppDrawer> {
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
openAppReviewDialog() async {
|
|
|
|
|
if (await _inAppReview.isAvailable()) {
|
|
|
|
|
_inAppReview.requestReview();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void setUserValues(value) async {
|
|
|
|
|
if (value != null) sharedPref.setObject(IMEI_USER_DATA, value);
|
|
|
|
|
}
|
|
|
|
|
|