migrate sample app

This commit is contained in:
Salvatore Giordano
2021-05-12 17:02:43 +02:00
parent 6d1db8d4bf
commit 0303e18945
15 changed files with 261 additions and 260 deletions
@@ -7,7 +7,7 @@ void showLocalNotification(Event event, String currentUserId) async {
EventType.messageNew,
EventType.notificationMessageNew,
].contains(event.type) ||
event.user.id == currentUserId) {
event.user!.id == currentUserId) {
return;
}
if (event.message == null) return;
@@ -21,9 +21,9 @@ void showLocalNotification(Event event, String currentUserId) async {
);
await flutterLocalNotificationsPlugin.initialize(initializationSettings);
await flutterLocalNotificationsPlugin.show(
event.message.id.hashCode,
event.message.user.name,
event.message.text,
event.message!.id.hashCode,
event.message!.user!.name,
event.message!.text,
NotificationDetails(
android: AndroidNotificationDetails(
'message channel',