do not disconnect android when the app is in background

This commit is contained in:
Salvatore Giordano
2020-04-09 16:57:48 +02:00
parent 5a38908bfb
commit d6033ec2b6
2 changed files with 29 additions and 6 deletions
+2 -2
View File
@@ -1,7 +1,7 @@
import 'package:flutter/material.dart';
import 'package:stream_chat_flutter/stream_chat_flutter.dart';
Future<void> _handleBackgroundNotification(
Future<void> _handleAndroidNotification(
Map<String, dynamic> notification,
) async {
final notificationData =
@@ -30,7 +30,7 @@ void main() async {
final client = Client(
's2dxdhpxd94g',
logLevel: Level.INFO,
customAndroidNotificationHandler: _handleBackgroundNotification,
androidNotificationHandler: _handleAndroidNotification,
);
await client.setUser(