@@ -290,13 +290,15 @@ class ZulipMenuItemButton extends StatelessWidget {
290
290
super .key,
291
291
this .style = ZulipMenuItemButtonStyle .menu,
292
292
required this .label,
293
+ this .subLabel,
293
294
required this .onPressed,
294
295
this .icon,
295
296
this .toggle,
296
297
});
297
298
298
299
final ZulipMenuItemButtonStyle style;
299
300
final String label;
301
+ final TextSpan ? subLabel;
300
302
final VoidCallback onPressed;
301
303
final IconData ? icon;
302
304
@@ -393,13 +395,29 @@ class ZulipMenuItemButton extends StatelessWidget {
393
395
foregroundColor: _labelColor (designVariables),
394
396
splashFactory: NoSplash .splashFactory,
395
397
).copyWith (backgroundColor: _backgroundColor (designVariables)),
398
+ overflowAxis: Axis .vertical,
396
399
onPressed: onPressed,
397
400
child: Padding (
398
401
padding: const EdgeInsets .symmetric (vertical: 4 ),
399
- // TODO sublabel, for [ZulipMenuItemButtonStyle.list]
400
- child: Text (label,
401
- style: const TextStyle (fontSize: 20 , height: 24 / 20 )
402
- .merge (weightVariableTextStyle (context, wght: _labelWght ())))));
402
+ child: Row (
403
+ spacing: 8 ,
404
+ crossAxisAlignment: CrossAxisAlignment .baseline,
405
+ textBaseline: localizedTextBaseline (context),
406
+ children: [
407
+ Flexible (child: Text (label,
408
+ overflow: TextOverflow .ellipsis,
409
+ style: const TextStyle (fontSize: 20 , height: 24 / 20 )
410
+ .merge (weightVariableTextStyle (context, wght: _labelWght ())))),
411
+ if (subLabel != null )
412
+ Flexible (child: Text .rich (subLabel! ,
413
+ overflow: TextOverflow .ellipsis,
414
+ style: TextStyle (
415
+ fontSize: 16 ,
416
+ height: 16 / 16 ,
417
+ color: _labelColor (designVariables).withFadedAlpha (0.70 ),
418
+ ).merge (weightVariableTextStyle (context, wght: _labelWght ())))),
419
+ ],
420
+ )));
403
421
}
404
422
}
405
423
0 commit comments