File tree 1 file changed +7
-2
lines changed
1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -19,10 +19,12 @@ class HomePage extends StatefulWidget {
19
19
20
20
class _HomePageState extends State <HomePage > {
21
21
StreamController <bool > loadingStream = StreamController <bool >.broadcast ();
22
+ late String _suggestedActionTextId;
22
23
23
24
@override
24
25
void initState () {
25
26
super .initState ();
27
+ _suggestedActionTextId = getRandomWhatToDoText ();
26
28
_logScreenView ();
27
29
}
28
30
@@ -33,7 +35,10 @@ class _HomePageState extends State<HomePage> {
33
35
}
34
36
35
37
Future <void > _logScreenView () async {
36
- await FirebaseAnalytics .instance.logScreenView (screenName: '/home' );
38
+ await FirebaseAnalytics .instance.logScreenView (
39
+ screenName: '/home' ,
40
+ parameters: {'action_text_id' : _suggestedActionTextId}
41
+ );
37
42
}
38
43
39
44
@override
@@ -77,7 +82,7 @@ class _HomePageState extends State<HomePage> {
77
82
crossAxisAlignment: CrossAxisAlignment .start,
78
83
children: < Widget > [
79
84
Style .body (
80
- MyLocalizations .of (context, getRandomWhatToDoText () ),
85
+ MyLocalizations .of (context, _suggestedActionTextId ),
81
86
fontSize: 16 ),
82
87
]),
83
88
)
You can’t perform that action at this time.
0 commit comments