StreamChat constructor
const
StreamChat({
- Key? key,
- required StreamChatClient client,
- required Widget? child,
- StreamChatThemeData? streamChatThemeData,
- StreamChatConfigurationData? streamChatConfigData,
- EventHandler? onBackgroundEventReceived,
- Duration backgroundKeepAlive = const Duration(minutes: 1),
- Stream<
List< ? connectivityStream,ConnectivityResult> >
Widget used to provide information about the chat to the widget tree
class MyApp extends StatelessWidget { final StreamChatClient client;
MyApp(this.client);
@override Widget build(BuildContext context) { return MaterialApp( home: Container( child: StreamChat( client: client, child: ChannelListPage(), ), ), ); } }
Use StreamChat.of to get the current StreamChatState instance.
Implementation
const StreamChat({
super.key,
required this.client,
required this.child,
this.streamChatThemeData,
this.streamChatConfigData,
this.onBackgroundEventReceived,
this.backgroundKeepAlive = const Duration(minutes: 1),
this.connectivityStream,
});