Implement streaming data into Flutter

This commit is contained in:
2023-07-28 13:54:57 +02:00
parent da851a985b
commit fb9dab3d1e
11 changed files with 374 additions and 32 deletions

View File

@@ -42,6 +42,10 @@ class MyAppState extends State<MyApp> {
await Permission.notification.request();
await MoxplatformPlugin.notifications.createNotificationChannel("Test notification channel", channelId, false);
MoxplatformPlugin.notifications.getEventStream().listen((event) {
print('NotificationEvent(type: ${event.type}, jid: ${event.jid}, payload: ${event.payload})');
});
}
@override