GFTextField constructor

GFTextField({
  1. Key? key,
  2. TextEditingController? controller,
  3. String? fieldinitialValue,
  4. FocusNode? focusNode,
  5. InputDecoration? decoration,
  6. TextInputType? keyboardType = TextInputType.text,
  7. TextCapitalization textCapitalization = TextCapitalization.none,
  8. TextInputAction? textInputAction,
  9. TextStyle? style = const TextStyle(),
  10. StrutStyle? strutStyle = const StrutStyle(),
  11. TextDirection? textDirection = TextDirection.ltr,
  12. TextAlign? textAlign = TextAlign.start,
  13. TextAlignVertical? textAlignVertical = TextAlignVertical.center,
  14. bool autofocus = false,
  15. bool? readOnly = false,
  16. bool? showCursor,
  17. String obscuringCharacter = '.',
  18. bool obscureText = false,
  19. bool autocorrect = true,
  20. SmartDashesType? smartDashesType,
  21. SmartQuotesType? smartQuotesType,
  22. bool enableSuggestions = true,
  23. bool? autovalidate = true,
  24. MaxLengthEnforcement maxLengthEnforced = MaxLengthEnforcement.none,
  25. int? maxLines = 1,
  26. int? minLines = 1,
  27. bool expands = false,
  28. int? maxLength,
  29. ValueChanged<String>? onChanged,
  30. GestureTapCallback? onTap,
  31. VoidCallback? onEditingComplete,
  32. ValueChanged<String>? onFieldSubmitted,
  33. FormFieldSetter<String>? onfieldSaved,
  34. FormFieldValidator<String>? validatornew,
  35. List<TextInputFormatter>? inputFormatters,
  36. bool fieldEnabled = true,
  37. double? cursorWidth = 2.0,
  38. double? cursorHeight,
  39. Radius? cursorRadius,
  40. Color? cursorColor,
  41. Color? color,
  42. Radius? borderradius,
  43. Brightness? keyboardAppearance,
  44. EdgeInsets scrollPadding = const EdgeInsets.all(20),
  45. bool enableInteractiveSelection = true,
  46. InputCounterWidgetBuilder? buildCounter,
  47. ScrollPhysics? scrollPhysics,
  48. Iterable<String>? autofillHints,
  49. AutovalidateMode autoValidateMode = AutovalidateMode.disabled,
})

Implementation

GFTextField(
    {Key? key,
    this.controller,
    this.fieldinitialValue,
    this.focusNode,
    this.decoration,
    this.keyboardType = TextInputType.text,
    this.textCapitalization = TextCapitalization.none,
    this.textInputAction,
    this.style = const TextStyle(),
    this.strutStyle = const StrutStyle(),
    this.textDirection = TextDirection.ltr,
    this.textAlign = TextAlign.start,
    this.textAlignVertical = TextAlignVertical.center,
    this.autofocus = false,
    this.readOnly = false,
    this.showCursor,
    this.obscuringCharacter = '.',
    this.obscureText = false,
    this.autocorrect = true,
    this.smartDashesType,
    this.smartQuotesType,
    this.enableSuggestions = true,
    this.autovalidate = true,
    this.maxLengthEnforced = MaxLengthEnforcement.none,
    this.maxLines = 1,
    this.minLines = 1,
    this.expands = false,
    this.maxLength,
    this.onChanged,
    this.onTap,
    this.onEditingComplete,
    this.onFieldSubmitted,
    this.onfieldSaved,
    this.validatornew,
    this.inputFormatters,
    this.fieldEnabled = true,
    this.cursorWidth = 2.0,
    this.cursorHeight,
    this.cursorRadius,
    this.cursorColor,
    this.color,
    this.borderradius,
    this.keyboardAppearance,
    this.scrollPadding = const EdgeInsets.all(20),
    this.enableInteractiveSelection = true,
    this.buildCounter,
    this.scrollPhysics,
    this.autofillHints,
    this.autoValidateMode = AutovalidateMode.disabled})
    : super(
          key: key,
          builder: (FormFieldState<String> field) => _GfTextFieldState(
                state: field,
                controller: controller,
                focusNode: focusNode,
                decoration: decoration,
                keyboardType: keyboardType,
                textInputAction: textInputAction,
                style: style,
                strutStyle: strutStyle,
                initialValuex: fieldinitialValue ?? '',
                autovalidate: autovalidate,
                onSavedx: onfieldSaved,
                validator: validatornew,
                color: color,
                borderradius: borderradius,
                autoValidateMode: autoValidateMode,
                textAlign: textAlign ?? TextAlign.start,
                textAlignVertical: textAlignVertical,
                textDirection: textDirection,
                textCapitalization: textCapitalization,
                autofocus: autofocus,
                readOnly: readOnly ?? false,
                showCursor: showCursor,
                obscuringCharacter: obscuringCharacter,
                obscureText: obscureText,
                autocorrect: autocorrect,
                smartDashesType: smartDashesType ??
                    (obscureText
                        ? SmartDashesType.disabled
                        : SmartDashesType.enabled),
                smartQuotesType: smartQuotesType ??
                    (obscureText
                        ? SmartQuotesType.disabled
                        : SmartQuotesType.enabled),
                enableSuggestions: enableSuggestions,
                maxLengthEnforced: maxLengthEnforced,
                maxLines: maxLines,
                minLines: minLines,
                expands: (maxLines == null && minLines == null) || false,
                maxLength: maxLength,
                onChanged: onChanged,
                onTap: onTap,
                onEditingComplete: onEditingComplete,
                onFieldSubmitted: onFieldSubmitted,
                inputFormatters: inputFormatters,
                enabled: fieldEnabled,
                cursorWidth: cursorWidth ?? 1,
                cursorHeight: cursorHeight,
                cursorRadius: cursorRadius,
                cursorColor: cursorColor,
                scrollPadding: scrollPadding,
                scrollPhysics: scrollPhysics,
                keyboardAppearance: keyboardAppearance,
                enableInteractiveSelection: enableInteractiveSelection,
                buildCounter: buildCounter,
                autofillHints: autofillHints,
              ));