@@ -210,16 +210,18 @@ Widget build(BuildContext context) {
210210 ),
211211 ),
212212 items: items
213- .map((String item) => DropdownItem<String>(
214- value: item,
215- height: 40 ,
216- child: Text(
217- item,
218- style: const TextStyle(
219- fontSize: 14,
220- ) ,
213+ .map(
214+ (String item) => DropdownItem<String>(
215+ value: item ,
216+ height: 40,
217+ child: Text(
218+ item,
219+ style: const TextStyle(
220+ fontSize: 14 ,
221221 ),
222- ))
222+ ),
223+ ),
224+ )
223225 .toList(),
224226 valueListenable: valueListenable,
225227 onChanged: (String? value) {
@@ -285,19 +287,21 @@ Widget build(BuildContext context) {
285287 ],
286288 ),
287289 items: items
288- .map((String item) => DropdownItem<String>(
289- value: item,
290- height: 40,
291- child: Text(
292- item,
293- style: const TextStyle(
294- fontSize: 14,
295- fontWeight: FontWeight.bold,
296- color: Colors.white,
297- ),
298- overflow: TextOverflow.ellipsis,
290+ .map(
291+ (String item) => DropdownItem<String>(
292+ value: item,
293+ height: 40,
294+ child: Text(
295+ item,
296+ style: const TextStyle(
297+ fontSize: 14,
298+ fontWeight: FontWeight.bold,
299+ color: Colors.white,
299300 ),
300- ))
301+ overflow: TextOverflow.ellipsis,
302+ ),
303+ ),
304+ )
301305 .toList(),
302306 valueListenable: valueListenable,
303307 onChanged: (value) {
@@ -376,19 +380,21 @@ Widget build(BuildContext context) {
376380 ),
377381 ),
378382 items: items
379- .map((String item) => DropdownItem<String>(
380- value: item,
381- height: 40 ,
382- child: Padding(
383- padding: const EdgeInsets.symmetric(horizontal: 8.0),
384- child: Text(
385- item,
386- style: const TextStyle(
387- fontSize: 14,
388- ) ,
383+ .map(
384+ (String item) => DropdownItem<String>(
385+ value: item ,
386+ height: 40,
387+ child: Padding(
388+ padding: const EdgeInsets.symmetric(horizontal: 8.0),
389+ child: Text(
390+ item,
391+ style: const TextStyle(
392+ fontSize: 14 ,
389393 ),
390394 ),
391- ))
395+ ),
396+ ),
397+ )
392398 .toList(),
393399 dropdownSeparator: const DropdownSeparator(
394400 height: 4,
@@ -502,22 +508,21 @@ Widget build(BuildContext context) {
502508 return items.map(
503509 (item) {
504510 return ValueListenableBuilder<List<String>>(
505- valueListenable: multiValueListenable,
506- builder: (context, multiValue, _) {
507- return Container(
508- alignment: AlignmentDirectional.center,
509- child: Text(
510- multiValue
511- .where((item) => item != 'All')
512- .join(', '),
513- style: const TextStyle(
514- fontSize: 14,
515- overflow: TextOverflow.ellipsis,
516- ),
517- maxLines: 1,
511+ valueListenable: multiValueListenable,
512+ builder: (context, multiValue, _) {
513+ return Container(
514+ alignment: AlignmentDirectional.center,
515+ child: Text(
516+ multiValue.where((item) => item != 'All').join(', '),
517+ style: const TextStyle(
518+ fontSize: 14,
519+ overflow: TextOverflow.ellipsis,
518520 ),
519- );
520- });
521+ maxLines: 1,
522+ ),
523+ );
524+ },
525+ );
521526 },
522527 ).toList();
523528 },
@@ -576,16 +581,18 @@ Widget build(BuildContext context) {
576581 ),
577582 ),
578583 items: items
579- .map((item) => DropdownItem(
580- value: item,
581- height: 40 ,
582- child: Text(
583- item,
584- style: const TextStyle(
585- fontSize: 14,
586- ) ,
584+ .map(
585+ (item) => DropdownItem(
586+ value: item ,
587+ height: 40,
588+ child: Text(
589+ item,
590+ style: const TextStyle(
591+ fontSize: 14 ,
587592 ),
588- ))
593+ ),
594+ ),
595+ )
589596 .toList(),
590597 valueListenable: valueListenable,
591598 onChanged: (value) {
@@ -970,15 +977,17 @@ Widget build(BuildContext context) {
970977 style: TextStyle(fontSize: 14),
971978 ),
972979 items: genderItems
973- .map((item) => DropdownItem<String>(
974- value: item,
975- child: Text(
976- item,
977- style: const TextStyle(
978- fontSize: 14,
979- ) ,
980+ .map(
981+ (item) => DropdownItem<String>(
982+ value: item,
983+ child: Text(
984+ item,
985+ style: const TextStyle(
986+ fontSize: 14 ,
980987 ),
981- ))
988+ ),
989+ ),
990+ )
982991 .toList(),
983992 valueListenable: valueListenable,
984993 validator: (value) {
@@ -1102,29 +1111,32 @@ class CustomDropdownButton2 extends StatelessWidget {
11021111 ),
11031112 valueListenable: valueListenable,
11041113 items: dropdownItems
1105- .map((String item) => DropdownItem<String>(
1106- value: item,
1107- height: itemHeight ?? 40 ,
1108- child: Container(
1109- alignment: valueAlignment,
1110- child: Text(
1111- item,
1112- overflow: TextOverflow.ellipsis ,
1113- maxLines: 1 ,
1114- style: const TextStyle(
1115- fontSize: 14,
1116- ) ,
1114+ .map(
1115+ (String item) => DropdownItem<String>(
1116+ value: item ,
1117+ height: itemHeight ?? 40,
1118+ child: Container(
1119+ alignment: valueAlignment,
1120+ child: Text(
1121+ item ,
1122+ overflow: TextOverflow.ellipsis ,
1123+ maxLines: 1,
1124+ style: const TextStyle(
1125+ fontSize: 14 ,
11171126 ),
11181127 ),
1119- ))
1128+ ),
1129+ ),
1130+ )
11201131 .toList(),
11211132 onChanged: onChanged,
11221133 selectedItemBuilder: selectedItemBuilder,
11231134 buttonStyleData: ButtonStyleData(
11241135 height: buttonHeight ?? 40,
11251136 width: buttonWidth ?? 140,
11261137 padding: buttonPadding ?? const EdgeInsets.only(left: 14, right: 14),
1127- decoration: buttonDecoration ??
1138+ decoration:
1139+ buttonDecoration ??
11281140 BoxDecoration(
11291141 borderRadius: BorderRadius.circular(14),
11301142 border: Border.all(
@@ -1144,7 +1156,8 @@ class CustomDropdownButton2 extends StatelessWidget {
11441156 maxHeight: dropdownHeight ?? 200,
11451157 width: dropdownWidth ?? 140,
11461158 padding: dropdownPadding,
1147- decoration: dropdownDecoration ??
1159+ decoration:
1160+ dropdownDecoration ??
11481161 BoxDecoration(
11491162 borderRadius: BorderRadius.circular(14),
11501163 ),
0 commit comments