SunnyTextField<T extends Object>.formField constructor

SunnyTextField<T extends Object>.formField({
  1. Key? key,
  2. required JsonPath attribute,
  3. bool obscureText = false,
  4. dynamic label,
  5. TextInputType? keyboardType,
  6. int? minLength,
  7. List<ValidatorFn<T?>> validators = const [],
  8. bool? isRequired,
  9. bool autovalidate = false,
  10. T? initialValue,
  11. FormValueChanged<T?>? onChange,
  12. FocusNode? focusNode,
  13. TextCapitalization? textCapitalization,
  14. ValueChanged<T?>? onSubmitted,
  15. bool? autocorrect,
  16. TextInputAction? textInputAction,
  17. dynamic placeholder,
  18. FieldConverter<T>? converter,
  19. TextEditingController? controller,
  20. bool autofocus = false,
  21. TextStyle? placeholderStyle,
  22. bool expands = false,
  23. int? minLines,
  24. int? maxLines,
  25. bool enabled = true,
})

Implementation

SunnyTextField.formField(
    {Key? key,
    required this.attribute,
    this.obscureText = false,
    this.label,
    this.keyboardType,
    this.minLength,
    this.validators = const [],
    this.isRequired,
    this.autovalidate = false,
    this.initialValue,
    this.onChange,
    this.focusNode,
    this.textCapitalization,
    this.onSubmitted,
    this.autocorrect,
    this.textInputAction,
    this.placeholder,
    this.converter,
    this.controller,
    this.autofocus = false,
    this.placeholderStyle,
    this.expands = false,
    this.minLines,
    this.maxLines,
    this.enabled = true})
    : cupertino = ((context, _) => CupertinoTextFieldData(
          expands: false,
          padding: EdgeInsets.zero,
          decoration: BoxDecoration(
              border: Border.all(style: BorderStyle.none, width: 0)))),
      material = ((context, _) => MaterialTextFieldData(expands: false)),
      super(key: key ?? Key("$attribute-input"));