From faf06880a9ade3ba4f792a06c7791c3c0823ab8c Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Thu, 21 Jul 2022 20:02:54 +0300 Subject: [PATCH] Show default terms/notes --- lib/ui/app/forms/decorated_form_field.dart | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/ui/app/forms/decorated_form_field.dart b/lib/ui/app/forms/decorated_form_field.dart index df3970abe..1c9992efd 100644 --- a/lib/ui/app/forms/decorated_form_field.dart +++ b/lib/ui/app/forms/decorated_form_field.dart @@ -109,7 +109,7 @@ class _DecoratedFormFieldState extends State { InputDecoration inputDecoration; if (widget.decoration != null) { inputDecoration = widget.decoration; - } else if (widget.label == null) { + } else if (widget.label == null && widget.hint == null) { inputDecoration = null; } else { var icon = widget.suffixIcon ?? iconButton; @@ -123,8 +123,8 @@ class _DecoratedFormFieldState extends State { } inputDecoration = InputDecoration( - labelText: widget.label, - hintText: widget.hint, + labelText: widget.label ?? '', + hintText: widget.hint ?? '', suffixIcon: icon == null ? null : icon, floatingLabelBehavior: (widget.hint ?? '').isNotEmpty && (widget.label ?? '').isEmpty