Updated the gallery text fields demo (#15362)

This commit is contained in:
Hans Muller
2018-03-14 14:42:45 -07:00
committed by GitHub
parent c345c1bbea
commit b6cca3923a
3 changed files with 185 additions and 101 deletions

View File

@@ -60,7 +60,9 @@ class TextFormField extends FormField<String> {
bool autofocus: false,
bool obscureText: false,
bool autocorrect: true,
bool maxLengthEnforced: true,
int maxLines: 1,
int maxLength,
ValueChanged<String> onFieldSubmitted,
FormFieldSetter<String> onSaved,
FormFieldValidator<String> validator,
@@ -71,7 +73,9 @@ class TextFormField extends FormField<String> {
assert(autofocus != null),
assert(obscureText != null),
assert(autocorrect != null),
assert(maxLengthEnforced != null),
assert(maxLines == null || maxLines > 0),
assert(maxLength == null || maxLength > 0),
super(
key: key,
initialValue: controller != null ? controller.text : (initialValue ?? ''),
@@ -91,7 +95,9 @@ class TextFormField extends FormField<String> {
autofocus: autofocus,
obscureText: obscureText,
autocorrect: autocorrect,
maxLengthEnforced: maxLengthEnforced,
maxLines: maxLines,
maxLength: maxLength,
onChanged: field.onChanged,
onSubmitted: onFieldSubmitted,
inputFormatters: inputFormatters,