Unify Input. Add border radius to pulldown

This commit is contained in:
grummbeer 2023-03-17 20:30:25 +01:00
parent f2ec6ff12a
commit 3b3556e600

View File

@ -1738,19 +1738,20 @@ class _ComboBox extends StatelessWidget {
current = keys[index]; current = keys[index];
return Container( return Container(
decoration: BoxDecoration( decoration: BoxDecoration(
border: Border.all( border: Border.all(
color: enabled color: enabled
? MyTheme.color(context).border2 ?? MyTheme.border ? MyTheme.color(context).border2 ?? MyTheme.border
: MyTheme.border, : MyTheme.border,
)), ),
height: 30, borderRadius:
BorderRadius.circular(8), //border raiuds of dropdown button
),
height: 42, // should be the height of a TextField
child: Obx(() => DropdownButton<String>( child: Obx(() => DropdownButton<String>(
isExpanded: true, isExpanded: true,
value: ref.value, value: ref.value,
elevation: 16, elevation: 16,
underline: Container( underline: Container(),
height: 25,
),
style: TextStyle( style: TextStyle(
color: enabled color: enabled
? Theme.of(context).textTheme.titleMedium?.color ? Theme.of(context).textTheme.titleMedium?.color
@ -1758,7 +1759,7 @@ class _ComboBox extends StatelessWidget {
icon: const Icon( icon: const Icon(
Icons.expand_more_sharp, Icons.expand_more_sharp,
size: 20, size: 20,
), ).marginOnly(right: 15),
onChanged: enabled onChanged: enabled
? (String? newValue) { ? (String? newValue) {
if (newValue != null && newValue != ref.value) { if (newValue != null && newValue != ref.value) {
@ -1775,11 +1776,11 @@ class _ComboBox extends StatelessWidget {
value, value,
style: const TextStyle(fontSize: _kContentFontSize), style: const TextStyle(fontSize: _kContentFontSize),
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
).marginOnly(left: 5), ).marginOnly(left: 15),
); );
}).toList(), }).toList(),
)), )),
); ).marginOnly(bottom: 5);
} }
} }