@@ -116,40 +116,52 @@ class StreamChatState extends State<StreamChat> {
116
116
@override
117
117
Widget build (BuildContext context) {
118
118
final theme = _getTheme (context, widget.streamChatThemeData);
119
- return Portal (
120
- child: StreamChatConfiguration (
121
- data: streamChatConfigData,
122
- child: StreamChatTheme (
123
- data: theme,
124
- child: Builder (
125
- builder: (context) {
126
- final materialTheme = Theme .of (context);
127
- final streamTheme = StreamChatTheme .of (context);
128
- return Theme (
129
- data: materialTheme.copyWith (
130
- primaryIconTheme: streamTheme.primaryIconTheme,
131
- colorScheme: materialTheme.colorScheme.copyWith (
132
- secondary: streamTheme.colorTheme.accentPrimary,
119
+ return Theme (
120
+ // package:media_kit or [Texture] can have issues with
121
+ // [ZoomPageTransitionsBuilder] on GNU/Linux. Thus, we use use
122
+ // [FadeUpwardsPageTransitionsBuilder] instead.
123
+ data: Theme .of (context).copyWith (
124
+ pageTransitionsTheme: const PageTransitionsTheme (
125
+ builders: {
126
+ TargetPlatform .linux: FadeUpwardsPageTransitionsBuilder (),
127
+ },
128
+ ),
129
+ ),
130
+ child: Portal (
131
+ child: StreamChatConfiguration (
132
+ data: streamChatConfigData,
133
+ child: StreamChatTheme (
134
+ data: theme,
135
+ child: Builder (
136
+ builder: (context) {
137
+ final materialTheme = Theme .of (context);
138
+ final streamTheme = StreamChatTheme .of (context);
139
+ return Theme (
140
+ data: materialTheme.copyWith (
141
+ primaryIconTheme: streamTheme.primaryIconTheme,
142
+ colorScheme: materialTheme.colorScheme.copyWith (
143
+ secondary: streamTheme.colorTheme.accentPrimary,
144
+ ),
133
145
),
134
- ),
135
- child : StreamChatCore (
136
- client : client ,
137
- onBackgroundEventReceived : widget.onBackgroundEventReceived ,
138
- backgroundKeepAlive : widget.backgroundKeepAlive ,
139
- connectivityStream : widget.connectivityStream,
140
- child : Builder (
141
- builder : (context) {
142
- StreamChatClient .additionalHeaders = {
143
- 'X-Stream-Client' :
144
- ' ${StreamChatClient .defaultUserAgent }-'
145
- 'ui-${ StreamChatClient . packageVersion }' ,
146
- } ;
147
- return widget.child ?? const Offstage ();
148
- } ,
146
+ child : StreamChatCore (
147
+ client : client,
148
+ onBackgroundEventReceived : widget.onBackgroundEventReceived ,
149
+ backgroundKeepAlive : widget.backgroundKeepAlive ,
150
+ connectivityStream : widget.connectivityStream ,
151
+ child : Builder (
152
+ builder : (context) {
153
+ StreamChatClient .additionalHeaders = {
154
+ 'X-Stream-Client' :
155
+ '${ StreamChatClient . defaultUserAgent }-'
156
+ 'ui- ${StreamChatClient .packageVersion }' ,
157
+ };
158
+ return widget.child ?? const Offstage () ;
159
+ },
160
+ ) ,
149
161
),
150
- ),
151
- );
152
- } ,
162
+ );
163
+ },
164
+ ) ,
153
165
),
154
166
),
155
167
),
0 commit comments