textFormField property

Widget get textFormField

Implementation

m.Widget get textFormField {
  // if (items == null && value != null && value is! String) {
  //   items = value;
  //   value = null;
  // }
  String text;
  if (value == null) {
    text = '';
  } else if (value is bool) {
    text = value ? 'true' : 'false';
  } else if (value is String) {
    text = value.trim();
  } else {
    text = value.toString().trim();
  }
//    return _textFormField ??= m.Material(
  return m.Material(
      child: m.TextFormField(
    key: Key('TextFormField$_key'),
    controller:
        controller ?? (value == null ? null : FieldController(text: text)),
    initialValue: controller == null && value == null ? initialValue : null,
    focusNode: focusNode,
    decoration: inputDecoration ?? InputDecoration(labelText: label),
    keyboardType: keyboardType,
    textCapitalization: textCapitalization!,
    textInputAction: textInputAction,
    style: style,
    textAlign: textAlign!,
    autofocus: autofocus!,
    obscureText: obscureText!,
    autocorrect: autocorrect!,
//      autovalidate: autovalidate,
//      maxLengthEnforced: maxLengthEnforced!,
    maxLengthEnforcement: maxLengthEnforcement!,
    maxLines: maxLines,
    onChanged: changed ?? onChanged,
    maxLength: maxLength,
    onEditingComplete: editingComplete ?? onEditingComplete,
    onFieldSubmitted: fieldSubmitted ?? onFieldSubmitted,
    onSaved: saved ?? onSaved,
    validator: validator ?? onValidator,
    inputFormatters: inputFormatters,
    enabled: enabled,
    keyboardAppearance: keyboardAppearance,
    scrollPadding: scrollPadding!,
    buildCounter: buildCounter,
    scrollPhysics: scrollPhysics,
    autofillHints: autofillHints,
    autovalidateMode: autovalidateMode,
  ));
}