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,
    strutStyle: strutStyle,
    textAlign: textAlign!,
    textAlignVertical: textAlignVertical,
    autofocus: autofocus!,
    readOnly: readOnly!,
    showCursor: showCursor,
    obscuringCharacter: obscuringCharacter!,
    obscureText: obscureText!,
    autocorrect: autocorrect!,
    smartDashesType: smartDashesType,
    smartQuotesType: smartQuotesType,
    enableSuggestions: enableSuggestions!,
//      autovalidate: autovalidate,
//      maxLengthEnforced: maxLengthEnforced!,
    maxLengthEnforcement: maxLengthEnforcement!,
    maxLines: maxLines,
    minLines: minLines,
    expands: expands!,
    maxLength: maxLength,
    onChanged: changed ?? onChanged,
    onTap: tap ?? onTap,
    onTapOutside: onTapOutside,
    onEditingComplete: editingComplete ?? onEditingComplete,
    onFieldSubmitted: fieldSubmitted ?? onFieldSubmitted,
    onSaved: saved ?? onSaved,
    validator: validator ?? onValidator,
    inputFormatters: inputFormatters,
    enabled: enabled,
    cursorWidth: cursorWidth!,
    cursorHeight: cursorHeight,
    cursorRadius: cursorRadius,
    cursorColor: cursorColor,
    keyboardAppearance: keyboardAppearance,
    scrollPadding: scrollPadding!,
    enableInteractiveSelection: enableInteractiveSelection,
    buildCounter: buildCounter,
    scrollPhysics: scrollPhysics,
    autofillHints: autofillHints,
    autovalidateMode: autovalidateMode,
    scrollController: scrollController,
    restorationId: restorationId,
    enableIMEPersonalizedLearning: enableIMEPersonalizedLearning!,
    mouseCursor: mouseCursor,
    contextMenuBuilder: contextMenuBuilder,
  ));
}