Skip to content

Commit 63ef8f3

Browse files
committed
Add get tags button
1 parent 660cdb5 commit 63ef8f3

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

example/lib/main.dart

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,13 @@ class _MyAppState extends State<MyApp> {
132132
OneSignal.User.removeTags(['test']);
133133
}
134134

135+
void _handleGetTags() async {
136+
print("Get tags");
137+
138+
var tags = await OneSignal.User.getTags();
139+
print(tags);
140+
}
141+
135142
void _handlePromptForPushPermission() {
136143
print("Prompting for Permission");
137144
OneSignal.Notifications.requestPermission(true);
@@ -262,6 +269,10 @@ class _MyAppState extends State<MyApp> {
262269
new OneSignalButton(
263270
"Send Tags", _handleSendTags, !_enableConsentButton)
264271
]),
272+
new TableRow(children: [
273+
new OneSignalButton(
274+
"Get Tags", _handleGetTags, !_enableConsentButton)
275+
]),
265276
new TableRow(children: [
266277
new OneSignalButton("Prompt for Push Permission",
267278
_handlePromptForPushPermission, !_enableConsentButton)

0 commit comments

Comments
 (0)