FTextField constructor

const FTextField({
  1. Key? key,
  2. String? label,
  3. bool isMandatory = false,
  4. TextEditingController? controller,
  5. FColorI fSelectColor = FColor.lightBlack,
  6. TextInputType textInputType = TextInputType.text,
  7. List<TextInputFormatter> inputFormatters = const [],
  8. bool enabled = true,
  9. bool showAlwaysEnabled = false,
  10. TextCapitalization textCapitalization = TextCapitalization.none,
  11. void onChanged(
    1. String
    )?,
  12. IconData? prefixIcon,
  13. TextAlign textAlign = TextAlign.end,
  14. String? hintText,
  15. FocusNode? focusNode,
  16. void onEditingComplete()?,
  17. VoidCallback? onTap,
  18. void onSubmitted(
    1. String
    )?,
  19. FIconType? suffixIcon,
  20. int? maxLines,
  21. int? minLines,
  22. double borderRadius = 5,
  23. bool obscureText = false,
  24. Iterable<String>? autofillHints,
  25. FTextStyle? labelStyle,
  26. FTextStyle? mandatoryStyle,
  27. FTextStyle? mandatoryStyleDisabled,
  28. FTextStyle? textStyle,
  29. FTextStyle? hintStyle,
  30. FTextStyle? disabledStyle,
  31. FTextStyle? errorStyle,
  32. AutovalidateMode? autovalidateMode,
  33. FColorI fillColor = FColor.noColor,
  34. FColorI fFillDisabledColor = FColor.lightPaleGray,
  35. FColorI fDisabledBorderColor = FColor.lightMidGray,
  36. FColorI fErrorBorderColor = FColor.lightError,
  37. FColorI fErrorTextColor = FColor.lightError,
  38. FColorI fErrorIconColor = FColor.lightError,
  39. FColorI fInstructionsColorText = FColor.lightBlack,
  40. String? instructions,
  41. bool readOnly = false,
  42. FIconType fIconError = FIconType.solid,
  43. InputDecoration? inputDecoration,
  44. bool isDense = false,
  45. FormFieldValidator<String>? validator,
  46. String? initialValue,
  47. bool isDropdown = false,
  48. double height = 48,
  49. double focusIndex = 0,
})

Implementation

const FTextField({
  Key? key,
  this.label,
  this.isMandatory = false,
  this.controller,
  this.fSelectColor = FColor.lightBlack,
  this.textInputType = TextInputType.text,
  this.inputFormatters = const [],
  this.enabled = true,
  this.showAlwaysEnabled = false,
  this.textCapitalization = TextCapitalization.none,
  this.onChanged,
  this.prefixIcon,
  this.textAlign = TextAlign.end,
  this.hintText,
  this.focusNode,
  this.onEditingComplete,
  this.onTap,
  this.onSubmitted,
  this.suffixIcon,
  this.maxLines,
  this.minLines,
  this.borderRadius = 5,
  this.obscureText = false,
  this.autofillHints,
  this.labelStyle,
  this.mandatoryStyle,
  this.mandatoryStyleDisabled,
  this.textStyle,
  this.hintStyle,
  this.disabledStyle,
  this.errorStyle,
  this.autovalidateMode,
  this.fillColor = FColor.noColor,
  this.fFillDisabledColor = FColor.lightPaleGray,
  this.fDisabledBorderColor = FColor.lightMidGray,
  this.fErrorBorderColor = FColor.lightError,
  this.fErrorTextColor = FColor.lightError,
  this.fErrorIconColor = FColor.lightError,
  this.fInstructionsColorText = FColor.lightBlack,
  this.instructions,
  this.readOnly = false,
  this.fIconError = FIconType.solid,
  this.inputDecoration,
  this.isDense = false,
  this.validator,
  this.initialValue,
  this.isDropdown = false,
  this.height = 48,
  this.focusIndex = 0,
})  : assert(
          (controller == null && initialValue == null) ||
              (controller != null && initialValue == null) ||
              (controller == null && initialValue != null),
          'Either controller or initialValue can be null. Both of them can be null. But both of them can not be non null'),
      assert(label != null || hintText != null),
      super(key: key);