Transfer showLocalNotification, backgroundKeepAlive from LLC to Core
Signed-off-by: Sahil Kumar <[email protected]>
This commit is contained in:
@@ -34,11 +34,21 @@ class StreamChat extends StatefulWidget {
|
||||
final Widget child;
|
||||
final StreamChatThemeData streamChatThemeData;
|
||||
|
||||
/// The amount of time that will pass before disconnecting the client in the background
|
||||
final Duration backgroundKeepAlive;
|
||||
|
||||
/// Handler called whenever the [client] receives a new [Event] while the app
|
||||
/// is in background. Can be used to display various notifications depending
|
||||
/// upon the [Event.type]
|
||||
final EventHandler onBackgroundEventReceived;
|
||||
|
||||
StreamChat({
|
||||
Key key,
|
||||
@required this.client,
|
||||
@required this.child,
|
||||
this.streamChatThemeData,
|
||||
this.onBackgroundEventReceived,
|
||||
this.backgroundKeepAlive = const Duration(minutes: 1),
|
||||
}) : super(
|
||||
key: key,
|
||||
);
|
||||
@@ -82,8 +92,10 @@ class StreamChatState extends State<StreamChat> {
|
||||
scaffoldBackgroundColor: streamTheme.colorTheme.white,
|
||||
),
|
||||
child: StreamChatCore(
|
||||
child: widget.child,
|
||||
client: client,
|
||||
child: widget.child,
|
||||
onBackgroundEventReceived: widget.onBackgroundEventReceived,
|
||||
backgroundKeepAlive: widget.backgroundKeepAlive,
|
||||
),
|
||||
);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user