@@ -121,13 +121,16 @@ class _FormBuilderDropdownState<T> extends State<FormBuilderDropdown<T>> {
121
121
return InputDecorator (
122
122
decoration: widget.decoration.copyWith (
123
123
errorText: field.errorText,
124
+ floatingLabelBehavior: widget.hint == null
125
+ ? widget.decoration.floatingLabelBehavior
126
+ : FloatingLabelBehavior .always,
124
127
),
125
128
isEmpty: field.value == null ,
126
- child: DropdownButtonHideUnderline (
127
- child : Row (
128
- mainAxisAlignment : MainAxisAlignment .start,
129
- children : < Widget > [
130
- Expanded (
129
+ child: Row (
130
+ mainAxisAlignment : MainAxisAlignment .start,
131
+ children : < Widget > [
132
+ Expanded (
133
+ child : DropdownButtonHideUnderline (
131
134
child: DropdownButton <T >(
132
135
isExpanded: widget.isExpanded,
133
136
hint: widget.hint,
@@ -163,19 +166,19 @@ class _FormBuilderDropdownState<T> extends State<FormBuilderDropdown<T>> {
163
166
selectedItemBuilder: widget.selectedItemBuilder,
164
167
),
165
168
),
166
- if (widget.allowClear &&
167
- ! widget.readOnly &&
168
- field.value != null ) ...[
169
- const VerticalDivider (),
170
- InkWell (
171
- child : widget.clearIcon,
172
- onTap : () {
173
- _changeValue (field, null );
174
- },
175
- ) ,
176
- ] ,
169
+ ),
170
+ if ( widget.allowClear &&
171
+ ! widget.readOnly &&
172
+ field.value != null ) ...[
173
+ const VerticalDivider (),
174
+ InkWell (
175
+ child : widget.clearIcon,
176
+ onTap : () {
177
+ _changeValue (field, null );
178
+ } ,
179
+ ) ,
177
180
],
178
- ) ,
181
+ ] ,
179
182
),
180
183
);
181
184
},
0 commit comments