Adjust style of app dropdown button
This commit is contained in:
parent
8dfe0e38d1
commit
5bb5d4ce57
|
|
@ -34,25 +34,26 @@ class AppDropdownButton<T> extends StatelessWidget {
|
||||||
}
|
}
|
||||||
final bool isEmpty = checkedValue == null || checkedValue == '';
|
final bool isEmpty = checkedValue == null || checkedValue == '';
|
||||||
|
|
||||||
Widget dropDownButton = DropdownButtonHideUnderline(
|
Widget dropDownButton = DropdownButtonFormField<T>(
|
||||||
child: DropdownButton<T>(
|
decoration: labelText != null
|
||||||
value: checkedValue,
|
? InputDecoration(label: Text(labelText!))
|
||||||
isExpanded: true,
|
: InputDecoration.collapsed(hintText: ''),
|
||||||
isDense: labelText != null,
|
value: checkedValue == blankValue ? null : checkedValue,
|
||||||
onChanged: enabled ? onChanged : null,
|
isExpanded: true,
|
||||||
selectedItemBuilder: selectedItemBuilder,
|
isDense: labelText != null,
|
||||||
items: [
|
onChanged: enabled ? onChanged : null,
|
||||||
if (showBlank || isEmpty)
|
selectedItemBuilder: selectedItemBuilder,
|
||||||
DropdownMenuItem<T>(
|
items: [
|
||||||
value: blankValue,
|
if (showBlank || isEmpty)
|
||||||
child: blankLabel == null ? SizedBox() : Text(blankLabel!),
|
DropdownMenuItem<T>(
|
||||||
),
|
value: blankValue,
|
||||||
...items
|
child: blankLabel == null ? SizedBox() : Text(blankLabel!),
|
||||||
],
|
),
|
||||||
),
|
...items
|
||||||
|
],
|
||||||
);
|
);
|
||||||
|
|
||||||
if (labelText != null) {
|
if (false && labelText != null) {
|
||||||
dropDownButton = InputDecorator(
|
dropDownButton = InputDecorator(
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
labelText: labelText!.isEmpty ? null : labelText,
|
labelText: labelText!.isEmpty ? null : labelText,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue