@@ -9,14 +9,40 @@ DropdownMenuEntry<T> buildDropdownMenuEntry<T>(
99 BuildContext context, {
1010 required T value,
1111 required String label,
12+ String ? subLabel,
1213 T ? selectedValue,
1314 Widget ? leadingWidget,
1415 Widget ? trailingWidget,
1516 String ? fontFamily,
17+ double maximumHeight = 29 ,
1618}) {
1719 final fontFamilyUsed = fontFamily != null
1820 ? getGoogleFontSafely (fontFamily).fontFamily ?? defaultFontFamily
1921 : defaultFontFamily;
22+ Widget ? labelWidget;
23+ if (subLabel != null ) {
24+ labelWidget = Column (
25+ crossAxisAlignment: CrossAxisAlignment .start,
26+ children: [
27+ FlowyText .regular (
28+ label,
29+ fontSize: 14 ,
30+ ),
31+ const VSpace (4 ),
32+ FlowyText .regular (
33+ subLabel,
34+ fontSize: 10 ,
35+ ),
36+ ],
37+ );
38+ } else {
39+ labelWidget = FlowyText .regular (
40+ label,
41+ fontSize: 14 ,
42+ textAlign: TextAlign .start,
43+ fontFamily: fontFamilyUsed,
44+ );
45+ }
2046
2147 return DropdownMenuEntry <T >(
2248 style: ButtonStyle (
@@ -26,17 +52,12 @@ DropdownMenuEntry<T> buildDropdownMenuEntry<T>(
2652 const EdgeInsets .symmetric (horizontal: 6 , vertical: 4 ),
2753 ),
2854 minimumSize: const WidgetStatePropertyAll (Size (double .infinity, 29 )),
29- maximumSize: const WidgetStatePropertyAll (Size (double .infinity, 29 )),
55+ maximumSize: WidgetStatePropertyAll (Size (double .infinity, maximumHeight )),
3056 ),
3157 value: value,
3258 label: label,
3359 leadingIcon: leadingWidget,
34- labelWidget: FlowyText .regular (
35- label,
36- fontSize: 14 ,
37- textAlign: TextAlign .start,
38- fontFamily: fontFamilyUsed,
39- ),
60+ labelWidget: labelWidget,
4061 trailingIcon: Row (
4162 children: [
4263 if (trailingWidget != null ) ...[
0 commit comments