-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.dart
99 lines (92 loc) · 2.35 KB
/
main.dart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
import 'package:app_review_helper/app_review_helper.dart';
import 'package:flutter/material.dart';
void main() {
runApp(MaterialApp(
home: const MyApp(),
theme: ThemeData(useMaterial3: false),
));
}
class MyApp extends StatefulWidget {
const MyApp({super.key});
@override
State<MyApp> createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
final instance = AppReviewHelper.instance;
@override
void initState() {
init();
super.initState();
}
Future<void> init() async {
debugPrint('DefaultReviewDialog');
await instance.initial(
reviewDialog: DefaultReviewDialog(
context: context,
opinionFeedback: (opinion) {
/// You can save this user's opinion to your database
debugPrint(opinion);
},
),
minCalls: 0,
minDays: 0,
keepRemind: true,
isDebug: false,
);
debugPrint('AdaptiveReviewDialog');
if (mounted) {
await instance.initial(
reviewDialog: AdaptiveReviewDialog(
context: context,
opinionFeedback: (opinion) {
/// You can save this user's opinion to your database
debugPrint(opinion);
},
),
minCalls: 0,
minDays: 0,
keepRemind: true,
isDebug: false,
);
}
debugPrint('FriendlyReviewDialog');
if (mounted) {
await instance.initial(
reviewDialog: FriendlyReviewDialog(
context: context,
opinionFeedback: (opinion) {
/// You can save this user's opinion to your database
debugPrint(opinion);
},
),
minCalls: 0,
minDays: 0,
keepRemind: true,
isDebug: false,
);
}
debugPrint('FriendlyAdaptiveReviewDialog');
if (mounted) {
await instance.initial(
reviewDialog: FriendlyAdaptiveReviewDialog(
context: context,
opinionFeedback: (opinion) {
/// You can save this user's opinion to your database
debugPrint(opinion);
},
),
minCalls: 0,
minDays: 0,
keepRemind: true,
isDebug: false,
);
}
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: const Text('Review Helper')),
body: const Center(child: Text('Example')),
);
}
}