@@ -209,6 +209,7 @@ class SubscriptionItem extends StatelessWidget {
209
209
Widget build (BuildContext context) {
210
210
final swatch = colorSwatchFor (context, subscription);
211
211
final hasUnreads = (unreadCount > 0 );
212
+ final opacity = subscription.isMuted ? 0.55 : 1.0 ;
212
213
return Material (
213
214
// TODO(#95) need dark-theme color
214
215
color: Colors .white,
@@ -222,30 +223,42 @@ class SubscriptionItem extends StatelessWidget {
222
223
const SizedBox (width: 16 ),
223
224
Padding (
224
225
padding: const EdgeInsets .symmetric (vertical: 11 ),
225
- child: Icon (size: 18 , color: swatch.iconOnPlainBackground,
226
- iconDataForStream (subscription))),
226
+ child: Opacity (
227
+ opacity: opacity,
228
+ child: Icon (size: 18 , color: swatch.iconOnPlainBackground,
229
+ iconDataForStream (subscription)),
230
+ ),
231
+ ),
227
232
const SizedBox (width: 5 ),
228
233
Expanded (
229
234
child: Padding (
230
235
padding: const EdgeInsets .symmetric (vertical: 10 ),
231
236
// TODO(design): unclear whether bold text is applied to all subscriptions
232
237
// or only those with unreads:
233
238
// https://github.com/zulip/zulip-flutter/pull/397#pullrequestreview-1742524205
234
- child: Text (
235
- style: const TextStyle (
236
- fontSize: 18 ,
237
- height: (20 / 18 ),
238
- // TODO(#95) need dark-theme color
239
- color: Color (0xFF262626 ),
240
- ).merge (weightVariableTextStyle (context,
241
- wght: hasUnreads ? 600 : null )),
242
- maxLines: 1 ,
243
- overflow: TextOverflow .ellipsis,
244
- subscription.name))),
239
+ child: Opacity (
240
+ opacity: opacity,
241
+ child: Text (
242
+ style: const TextStyle (
243
+ fontSize: 18 ,
244
+ height: (20 / 18 ),
245
+ // TODO(#95) need dark-theme color
246
+ color: Color (0xFF262626 ),
247
+ ).merge (weightVariableTextStyle (context,
248
+ wght: hasUnreads ? 600 : null )),
249
+ maxLines: 1 ,
250
+ overflow: TextOverflow .ellipsis,
251
+ subscription.name),
252
+ ))),
245
253
if (unreadCount > 0 ) ...[
246
254
const SizedBox (width: 12 ),
247
255
// TODO(#747) show @-mention indicator when it applies
248
- UnreadCountBadge (count: unreadCount, backgroundColor: swatch, bold: true ),
256
+ Opacity (
257
+ opacity: opacity,
258
+ child: UnreadCountBadge (
259
+ count: unreadCount,
260
+ backgroundColor: swatch,
261
+ bold: true )),
249
262
],
250
263
const SizedBox (width: 16 ),
251
264
])));
0 commit comments