use a static map for additional headers

This commit is contained in:
Salvatore Giordano
2021-11-03 12:53:36 +01:00
parent dbe9e38ab0
commit 55e4c1ebd5
9 changed files with 74 additions and 38 deletions
@@ -92,7 +92,9 @@ class StreamChatCoreState extends State<StreamChatCore>
with WidgetsBindingObserver {
/// Constructor used for creating a new instance of [StreamChatCoreState].
StreamChatCoreState() {
usedPackage = Package.core;
StreamChatClient.additionalHeaders = {
'X-Stream-Client': '${StreamChatClient.defaultUserAgent}-${Package.ui}',
};
}
/// Initialized client used throughout the application.