GTFTextField constructor
const
GTFTextField({
- Key? key,
- ValueChanged<
String> ? onChanged, - ValueChanged<
String> ? onSubmitted, - GestureTapCallback? onTap,
- VoidCallback? onEditingComplete,
- VoidCallback? onClear,
- TextEditingController? controller,
- FocusNode? focusNode,
- String? text,
- String? placeholder,
- String clearIcon = "packages/gtech_flutter_ui/assets/svg/gtf_input_clear.svg",
- String secretCloseIcon = "packages/gtech_flutter_ui/assets/svg/gtf_input_secret_0.svg",
- String secretOpenIcon = "packages/gtech_flutter_ui/assets/svg/gtf_input_secret_1.svg",
- bool isEnabled = true,
- bool hideLine = false,
- bool hideClear = false,
- bool isSecret = false,
- int? maxLines = 1,
- double radius = 0,
- double? fontSize = GTFFont.title,
- double suffixIconMargin = 8,
- double cursorWidth = 1,
- double lineHeight = 0.5,
- Color? backgroundColor,
- Color? textColor = GTFColor.grey6,
- Color? textDisabledColor = GTFColor.grey6,
- Color? placeholderColor = GTFColor.grey3,
- Color? cursorColor = GTFColor.black,
- Color lineNormalColor = GTFColor.grey2,
- Color lineFocusedColor = GTFColor.yellowPrimary,
- Color lineDisabledColor = GTFColor.grey2,
- FontWeight? fontWeight = GTFFont.regular,
- TextAlign textAlign = TextAlign.start,
- List<
TextInputFormatter> ? inputFormatters, - TextInputType? keyboardType,
- TextInputAction? textInputAction = TextInputAction.done,
- EdgeInsets? padding,
- EdgeInsets? contentPadding = const EdgeInsets.fromLTRB(0, 12, 8, 12),
- EdgeInsets? suffixIconPadding,
- Widget? suffixWidget,
Implementation
const GTFTextField({
Key? key,
this.onChanged,
this.onSubmitted,
this.onTap,
this.onEditingComplete,
this.onClear,
this.controller,
this.focusNode,
this.text,
this.placeholder,
this.clearIcon = "packages/gtech_flutter_ui/assets/svg/gtf_input_clear.svg",
this.secretCloseIcon = "packages/gtech_flutter_ui/assets/svg/gtf_input_secret_0.svg",
this.secretOpenIcon = "packages/gtech_flutter_ui/assets/svg/gtf_input_secret_1.svg",
this.isEnabled = true,
this.hideLine = false,
this.hideClear = false,
this.isSecret = false,
this.maxLines = 1,
this.radius = 0,
this.fontSize = GTFFont.title,
this.suffixIconMargin = 8,
this.cursorWidth = 1,
this.lineHeight = 0.5,
this.backgroundColor,
this.textColor = GTFColor.grey6,
this.textDisabledColor = GTFColor.grey6,
this.placeholderColor = GTFColor.grey3,
this.cursorColor = GTFColor.black,
this.lineNormalColor = GTFColor.grey2,
this.lineFocusedColor = GTFColor.yellowPrimary,
this.lineDisabledColor = GTFColor.grey2,
this.fontWeight = GTFFont.regular,
this.textAlign = TextAlign.start,
this.inputFormatters,
this.keyboardType,
this.textInputAction = TextInputAction.done,
this.padding,
this.contentPadding = const EdgeInsets.fromLTRB(0, 12, 8, 12),
this.suffixIconPadding,
this.suffixWidget,
}) : super(key: key);