Correct custom product fields

This commit is contained in:
Hillel Coren 2020-12-23 13:37:07 +02:00
parent 478dbf2673
commit 482f56eebf
1 changed files with 9 additions and 1 deletions

View File

@ -65,10 +65,18 @@ class _CustomFieldState extends State<CustomField> {
switch (fieldType) {
case kFieldTypeSingleLineText:
return DecoratedFormField(
controller: _controller,
maxLines: 1,
label: widget.hideFieldLabel ? null : fieldLabel,
onChanged: widget.onChanged,
onSavePressed: widget.onSavePressed,
);
case kFieldTypeMultiLineText:
return DecoratedFormField(
controller: _controller,
maxLines: fieldType == kFieldTypeSingleLineText ? 1 : 3,
maxLines: 3,
keyboardType: TextInputType.multiline,
label: widget.hideFieldLabel ? null : fieldLabel,
onChanged: widget.onChanged,
onSavePressed: widget.onSavePressed,