Transfer showLocalNotification, backgroundKeepAlive from LLC to Core

Signed-off-by: Sahil Kumar <[email protected]>
This commit is contained in:
Sahil Kumar
2021-01-29 17:23:00 +05:30
parent 4b9a7d6837
commit 5310287fdd
7 changed files with 72 additions and 98 deletions
@@ -33,8 +33,6 @@ void main() async {
final client = Client(
apiKey ?? kDefaultStreamApiKey,
logLevel: Level.INFO,
showLocalNotification:
(!kIsWeb && Platform.isAndroid) ? showLocalNotification : null,
)..chatPersistenceClient = chatPersistentClient;
if (userId != null) {
@@ -73,6 +71,7 @@ class MyApp extends StatelessWidget {
builder: (context, child) {
return StreamChat(
client: client,
onBackgroundEventReceived: showLocalNotification,
child: Builder(
builder: (context) => AnnotatedRegion<SystemUiOverlayStyle>(
child: child,