ZeroTextField.filled constructor

ZeroTextField.filled({
  1. Key? key,
  2. String? hintText,
  3. String? labelText,
  4. ZeroTextfieldSize? textfielSizeType,
  5. TextEditingController? controller,
  6. FocusNode? focusNode,
  7. TextInputType? inputType,
  8. dynamic onChanged(
    1. String
    )?,
  9. dynamic onEditingComplete()?,
  10. String? validator(
    1. String?
    )?,
  11. AutovalidateMode? autovalidateMode,
  12. Widget? prefixIcon,
  13. Widget? suffixIcon,
  14. Widget? prefix,
  15. Widget? suffix,
  16. InputDecoration? decoration,
  17. String? errorText,
  18. String? helperText,
  19. bool? enabled,
  20. bool? autofocus,
  21. void onFieldSubmitted(
    1. String text
    )?,
  22. void onSaved(
    1. String? text
    )?,
  23. void onTap()?,
  24. void onTapOutside(
    1. PointerDownEvent event
    )?,
  25. OnFocusChanged? onFocusChanged,
  26. bool? autocorrect,
  27. Iterable<String>? autofillHints,
  28. BuildCounter? buildCounter,
  29. ContextMenuBuilder? contextMenuBuilder,
  30. Color? cursorColor,
  31. double? cursorHeight,
  32. Radius? cursorRadius,
  33. double? cursorWidth,
  34. bool? enableIMEPersonalizedLearning,
  35. bool? enableInteractiveSelection,
  36. bool? enableSuggestion,
  37. TextStyle? errorStyle,
  38. TextStyle? helperStyle,
  39. TextStyle? labelStyle,
  40. int? maxLength,
  41. bool? expands,
  42. String? initialValue,
  43. List<TextInputFormatter>? inputFormatters,
  44. Brightness? keyboardAppearance,
  45. MaxLengthEnforcement? maxLengthEnforcement,
  46. int? maxLines,
  47. int? minLines,
  48. MouseCursor? mouseCursor,
  49. bool? obscureText,
  50. String? obscuringCharacter,
  51. bool? readOnly,
  52. ScrollController? scrollController,
  53. EdgeInsets? scrollPadding,
  54. ScrollPhysics? scrollPhysics,
  55. TextSelectionControls? selectionControls,
  56. bool? showCursor,
  57. StrutStyle? strutStyle,
  58. TextStyle? style,
  59. TextAlign? textAlign,
  60. TextAlignVertical? textAlignVertical,
  61. TextCapitalization? textCapitalization,
  62. TextDirection? textDirection,
  63. TextInputAction? textInputAction,
})

This already uses UnderlineInputBorder under the hood with fillColor set as per defined in the standard ZeroOne design guideline.

Implementation

factory ZeroTextField.filled({
  Key? key,
  String? hintText,
  String? labelText,
  ZeroTextfieldSize? textfielSizeType,
  TextEditingController? controller,
  FocusNode? focusNode,
  TextInputType? inputType,
  Function(String)? onChanged,
  Function()? onEditingComplete,
  String? Function(String?)? validator,
  AutovalidateMode? autovalidateMode,
  Widget? prefixIcon,
  Widget? suffixIcon,
  Widget? prefix,
  Widget? suffix,
  InputDecoration? decoration,
  String? errorText,
  String? helperText,
  bool? enabled,
  bool? autofocus,
  void Function(String text)? onFieldSubmitted,
  void Function(String? text)? onSaved,
  void Function()? onTap,
  void Function(PointerDownEvent event)? onTapOutside,
  OnFocusChanged? onFocusChanged,
  bool? autocorrect,
  Iterable<String>? autofillHints,
  BuildCounter? buildCounter,
  ContextMenuBuilder? contextMenuBuilder,
  Color? cursorColor,
  double? cursorHeight,
  Radius? cursorRadius,
  double? cursorWidth,
  bool? enableIMEPersonalizedLearning,
  bool? enableInteractiveSelection,
  bool? enableSuggestion,
  TextStyle? errorStyle,
  TextStyle? helperStyle,
  TextStyle? labelStyle,
  int? maxLength,
  bool? expands,
  String? initialValue,
  List<TextInputFormatter>? inputFormatters,
  Brightness? keyboardAppearance,
  MaxLengthEnforcement? maxLengthEnforcement,
  int? maxLines,
  int? minLines,
  MouseCursor? mouseCursor,
  bool? obscureText,
  String? obscuringCharacter,
  bool? readOnly,
  ScrollController? scrollController,
  EdgeInsets? scrollPadding,
  ScrollPhysics? scrollPhysics,
  TextSelectionControls? selectionControls,
  bool? showCursor,
  StrutStyle? strutStyle,
  TextStyle? style,
  TextAlign? textAlign,
  TextAlignVertical? textAlignVertical,
  TextCapitalization? textCapitalization,
  TextDirection? textDirection,
  TextInputAction? textInputAction,
}) =>
    ZeroTextField(
      key: key,
      labelText: labelText,
      hintText: hintText,
      controller: controller,
      focusNode: focusNode,
      keyboardType: inputType,
      onChanged: onChanged,
      onEditingComplete: onEditingComplete,
      validator: validator,
      textfieldSize: textfielSizeType ?? ZeroTextfieldSize.small,
      autovalidateMode: autovalidateMode,
      inputDecorationType: InputDecorationType.fill,
      decoration: decoration,
      helperText: helperText,
      errorText: errorText,
      enabled: enabled,
      prefixIcon: prefixIcon,
      suffixIcon: suffixIcon,
      prefix: prefix,
      suffix: suffix,
      autofocus: autofocus,
      onFieldSubmitted: onFieldSubmitted,
      onSaved: onSaved,
      onTap: onTap,
      onTapOutside: onTapOutside,
      onFocusChanged: onFocusChanged,
      autocorrect: autocorrect ?? false,
      autofillHints: autofillHints,
      buildCounter: buildCounter,
      contextMenuBuilder: contextMenuBuilder,
      cursorColor: cursorColor,
      cursorHeight: cursorHeight,
      cursorRadius: cursorRadius,
      cursorWidth: cursorWidth ?? 2.0,
      enableIMEPersonalizedLearning: enableIMEPersonalizedLearning ?? true,
      enableInteractiveSelection: enableInteractiveSelection,
      enableSuggestion: enableSuggestion ?? false,
      errorStyle: errorStyle,
      expands: expands ?? false,
      helperStyle: helperStyle,
      initialValue: initialValue,
      inputFormatters: inputFormatters,
      keyboardAppearance: keyboardAppearance,
      labelStyle: labelStyle,
      maxLength: maxLength,
      maxLengthEnforcement: maxLengthEnforcement,
      maxLines: maxLines,
      minLines: minLines,
      mouseCursor: mouseCursor,
      obscureText: obscureText ?? false,
      obscuringCharacter: obscuringCharacter ?? '•',
      readOnly: readOnly ?? false,
      scrollController: scrollController,
      scrollPadding: scrollPadding ?? const EdgeInsets.all(20.0),
      scrollPhysics: scrollPhysics,
      selectionControls: selectionControls,
      showCursor: showCursor ?? false,
      strutStyle: strutStyle,
      style: style,
      textAlign: textAlign ?? TextAlign.start,
      textAlignVertical: textAlignVertical,
      textCapitalization: textCapitalization ?? TextCapitalization.none,
      textDirection: textDirection,
      textInputAction: textInputAction,
    );