Flutter_form_builder: FormBuilderTextField not take "obscureText: true" to hide password field

Created on 29 Jan 2020  路  2Comments  路  Source: danvick/flutter_form_builder

i using flutter_form_builder: ^3.7.3.
and I use this "obscure text: true" to hide the password field in FormBuilderTextField.
flutter compiler give an error:-
"Obscured fields cannot be multiline.
'package:flutter/src/material/text_form_field.dart':
Failed assertion: line 149 pos 15: '!obscureText || maxLines == 1' "

Most helpful comment

@marqueetest you need to pass this attribute: maxLines: 1

This error was introduced in flutter 1.12

All 2 comments

@marqueetest you need to pass this attribute: maxLines: 1

This error was introduced in flutter 1.12

Could we default to maxLines: 1 when obsureText is set? This feels like a easily fixable default.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

SachinTanpure picture SachinTanpure  路  3Comments

AlmogRnD picture AlmogRnD  路  3Comments

SachinTanpure picture SachinTanpure  路  3Comments

vimalmistry picture vimalmistry  路  4Comments

joshuakoh1 picture joshuakoh1  路  3Comments