# Chat Client

`StreamChatCore` is a version of `StreamChat` found in `stream_chat_flutter` that is decoupled from
theme and initialisations.

Find the pub.dev documentation [here](https://pub.dev/documentation/stream_chat_flutter_core/latest/stream_chat_flutter_core/StreamChatCore-class.html)

`StreamChatCore` is used to provide information about the chat client to the widget tree.
This Widget is used to react to life cycle changes and system updates.
When the app goes into the background, the web socket connection is automatically closed and when it goes back to foreground the connection is opened again.

Like the `StreamChat` widget in the higher level UI package, the `StreamChatCore` widget should
be on the top level before using any Stream functionality:

```dart
return MaterialApp(
      title: 'Stream Chat Core Example',
      home: HomeScreen(),
      builder: (context, child) => StreamChatCore(
        client: client,
        child: child,
      ),
    );
```


---

This page was last updated at 2026-03-05T19:03:01.681Z.

For the most recent version of this documentation, visit [https://getstream.io/chat/docs/sdk/flutter/stream_chat_flutter_core/stream_chat_core/](https://getstream.io/chat/docs/sdk/flutter/stream_chat_flutter_core/stream_chat_core/).