Skip to content

Commit

Permalink
chore(analytics): add a button to the example app for analytics (fire…
Browse files Browse the repository at this point in the history
  • Loading branch information
Lyokone authored Jan 4, 2024
1 parent 82af6c2 commit 0c92578
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,11 @@ class _MyHomePageState extends State<MyHomePage> {
setMessage('setUserProperty succeeded');
}

Future<void> _testSetConsent() async {
await widget.analytics.setConsent(adStorageConsentGranted: true);
setMessage('setConsent succeeded');
}

Future<void> _testAppInstanceId() async {
String? id = await widget.analytics.appInstanceId;
if (id != null) {
Expand Down Expand Up @@ -356,6 +361,10 @@ class _MyHomePageState extends State<MyHomePage> {
onPressed: _testResetAnalyticsData,
child: const Text('Test resetAnalyticsData'),
),
MaterialButton(
onPressed: _testSetConsent,
child: const Text('Test setConsent'),
),
MaterialButton(
onPressed: _setDefaultEventParameters,
child: const Text('Test setDefaultEventParameters'),
Expand Down

0 comments on commit 0c92578

Please sign in to comment.