|
1 | 1 | import 'dart:async'; |
2 | 2 |
|
3 | 3 | import 'package:flutter/material.dart'; |
| 4 | +import 'package:flutter_portal/flutter_portal.dart'; |
4 | 5 | import 'package:stream_chat_flutter/src/misc/empty_widget.dart'; |
5 | 6 | import 'package:stream_chat_flutter/src/video/vlc/vlc_manager.dart'; |
6 | 7 | import 'package:stream_chat_flutter/stream_chat_flutter.dart'; |
@@ -154,34 +155,36 @@ class StreamChatState extends State<StreamChat> { |
154 | 155 | @override |
155 | 156 | Widget build(BuildContext context) { |
156 | 157 | final theme = _getTheme(context, widget.streamChatThemeData); |
157 | | - return StreamChatConfiguration( |
158 | | - data: streamChatConfigData, |
159 | | - child: StreamChatTheme( |
160 | | - data: theme, |
161 | | - child: Builder( |
162 | | - builder: (context) { |
163 | | - final materialTheme = Theme.of(context); |
164 | | - final streamTheme = StreamChatTheme.of(context); |
165 | | - return Theme( |
166 | | - data: materialTheme.copyWith( |
167 | | - primaryIconTheme: streamTheme.primaryIconTheme, |
168 | | - colorScheme: materialTheme.colorScheme.copyWith( |
169 | | - secondary: streamTheme.colorTheme.accentPrimary, |
| 158 | + return Portal( |
| 159 | + child: StreamChatConfiguration( |
| 160 | + data: streamChatConfigData, |
| 161 | + child: StreamChatTheme( |
| 162 | + data: theme, |
| 163 | + child: Builder( |
| 164 | + builder: (context) { |
| 165 | + final materialTheme = Theme.of(context); |
| 166 | + final streamTheme = StreamChatTheme.of(context); |
| 167 | + return Theme( |
| 168 | + data: materialTheme.copyWith( |
| 169 | + primaryIconTheme: streamTheme.primaryIconTheme, |
| 170 | + colorScheme: materialTheme.colorScheme.copyWith( |
| 171 | + secondary: streamTheme.colorTheme.accentPrimary, |
| 172 | + ), |
170 | 173 | ), |
171 | | - ), |
172 | | - child: StreamChatCore( |
173 | | - client: client, |
174 | | - onBackgroundEventReceived: widget.onBackgroundEventReceived, |
175 | | - backgroundKeepAlive: widget.backgroundKeepAlive, |
176 | | - connectivityStream: widget.connectivityStream, |
177 | | - child: Builder( |
178 | | - builder: (context) { |
179 | | - return widget.child ?? const Empty(); |
180 | | - }, |
| 174 | + child: StreamChatCore( |
| 175 | + client: client, |
| 176 | + onBackgroundEventReceived: widget.onBackgroundEventReceived, |
| 177 | + backgroundKeepAlive: widget.backgroundKeepAlive, |
| 178 | + connectivityStream: widget.connectivityStream, |
| 179 | + child: Builder( |
| 180 | + builder: (context) { |
| 181 | + return widget.child ?? const Empty(); |
| 182 | + }, |
| 183 | + ), |
181 | 184 | ), |
182 | | - ), |
183 | | - ); |
184 | | - }, |
| 185 | + ); |
| 186 | + }, |
| 187 | + ), |
185 | 188 | ), |
186 | 189 | ), |
187 | 190 | ); |
|
0 commit comments