update notification
This commit is contained in:
@@ -28,6 +28,7 @@ void main() async {
|
|||||||
showLocalNotification:
|
showLocalNotification:
|
||||||
(!kIsWeb && Platform.isAndroid) ? showLocalNotification : null,
|
(!kIsWeb && Platform.isAndroid) ? showLocalNotification : null,
|
||||||
persistenceEnabled: true,
|
persistenceEnabled: true,
|
||||||
|
backgroundKeepAlive: Duration(seconds: 3),
|
||||||
);
|
);
|
||||||
|
|
||||||
if (userId != null) {
|
if (userId != null) {
|
||||||
|
|||||||
@@ -33,7 +33,8 @@ void showLocalNotification(Message message, ChannelModel channel) async {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Future backgroundHandler(Map<String, dynamic> notification) 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 =
|
final notificationData =
|
||||||
await NotificationService.getAndStoreMessage(messageId);
|
await NotificationService.getAndStoreMessage(messageId);
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
name: example
|
name: example
|
||||||
description: A new Flutter project.
|
description: A new Flutter project.
|
||||||
version: 1.0.83+85
|
version: 1.0.84+86
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ">=2.2.2 <3.0.0"
|
sdk: ">=2.2.2 <3.0.0"
|
||||||
|
|||||||
Reference in New Issue
Block a user