From 9598e17abb11700bd56fce4fae9ac281320240c7 Mon Sep 17 00:00:00 2001 From: Patrick Alvin Alcala Date: Wed, 5 Feb 2025 17:35:57 +0800 Subject: [PATCH] update --- lib/widgets/dropdown_widget.dart | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/lib/widgets/dropdown_widget.dart b/lib/widgets/dropdown_widget.dart index e958e82..285ff55 100644 --- a/lib/widgets/dropdown_widget.dart +++ b/lib/widgets/dropdown_widget.dart @@ -35,17 +35,26 @@ class DropDownWidget extends StatelessWidget { border: Border.all(color: Colors.white), // Set the border color ), child: DropdownMenu( - initialSelection: '', - dropdownMenuEntries: [ - for (var item in list) - DropdownMenuEntry( - label: item[listTitle].toString(), - value: item[listTitle], - ) - ], - onSelected: onChanged, - width: MediaQuery.of(context).size.width, - textStyle: GoogleFonts.outfit(textStyle: TextStyle(color: Colors.white))), + initialSelection: '', + dropdownMenuEntries: [ + for (var item in list) + DropdownMenuEntry( + label: item[listTitle].toString(), + value: item[listTitle], + ) + ], + onSelected: onChanged, + width: MediaQuery.of(context).size.width * 0.8, + menuHeight: MediaQuery.of(context).size.width * 0.9, + textStyle: GoogleFonts.outfit(textStyle: TextStyle(color: Colors.white)), + menuStyle: MenuStyle( + backgroundColor: WidgetStateProperty.all(const Color.fromRGBO(13, 84, 106, 0.7)), + padding: WidgetStateProperty.all(const EdgeInsets.symmetric(vertical: 8.0)), + shape: WidgetStateProperty.all(RoundedRectangleBorder( + borderRadius: BorderRadius.circular(12), // Set the border radius for the dropdown menu + )), + ), + ), ), ], );