Show default terms/notes
This commit is contained in:
parent
49311cd212
commit
faf06880a9
|
|
@ -109,7 +109,7 @@ class _DecoratedFormFieldState extends State<DecoratedFormField> {
|
||||||
InputDecoration inputDecoration;
|
InputDecoration inputDecoration;
|
||||||
if (widget.decoration != null) {
|
if (widget.decoration != null) {
|
||||||
inputDecoration = widget.decoration;
|
inputDecoration = widget.decoration;
|
||||||
} else if (widget.label == null) {
|
} else if (widget.label == null && widget.hint == null) {
|
||||||
inputDecoration = null;
|
inputDecoration = null;
|
||||||
} else {
|
} else {
|
||||||
var icon = widget.suffixIcon ?? iconButton;
|
var icon = widget.suffixIcon ?? iconButton;
|
||||||
|
|
@ -123,8 +123,8 @@ class _DecoratedFormFieldState extends State<DecoratedFormField> {
|
||||||
}
|
}
|
||||||
|
|
||||||
inputDecoration = InputDecoration(
|
inputDecoration = InputDecoration(
|
||||||
labelText: widget.label,
|
labelText: widget.label ?? '',
|
||||||
hintText: widget.hint,
|
hintText: widget.hint ?? '',
|
||||||
suffixIcon: icon == null ? null : icon,
|
suffixIcon: icon == null ? null : icon,
|
||||||
floatingLabelBehavior:
|
floatingLabelBehavior:
|
||||||
(widget.hint ?? '').isNotEmpty && (widget.label ?? '').isEmpty
|
(widget.hint ?? '').isNotEmpty && (widget.label ?? '').isEmpty
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue