update notification

This commit is contained in:
Salvatore Giordano
2020-11-30 12:26:54 +01:00
parent c0d7571fbf
commit aed495e80f
3 changed files with 4 additions and 2 deletions
+1
View File
@@ -28,6 +28,7 @@ void main() async {
showLocalNotification:
(!kIsWeb && Platform.isAndroid) ? showLocalNotification : null,
persistenceEnabled: true,
backgroundKeepAlive: Duration(seconds: 3),
);
if (userId != null) {
+2 -1
View File
@@ -33,7 +33,8 @@ void showLocalNotification(Message message, ChannelModel channel) async {
}
Future backgroundHandler(Map<String, dynamic> notification) async {
final messageId = notification['data']['message_id'];
print('new notification ${notification}');
final messageId = notification['data']['id'];
final notificationData =
await NotificationService.getAndStoreMessage(messageId);
+1 -1
View File
@@ -1,6 +1,6 @@
name: example
description: A new Flutter project.
version: 1.0.83+85
version: 1.0.84+86
environment:
sdk: ">=2.2.2 <3.0.0"