AppTextField constructor
AppTextField({
- Key? key,
- double? height = 40.0,
- double? width,
- String? floatingHint,
- String? initialValue,
- double? contentPadding = 5.0,
- TextEditingController? controller,
- void onSaved()?,
- int? maxLines = 1,
- int? minLines = 1,
- FormFieldValidator<
String> ? validator, - Color? hintColor,
- Color? textColor,
- Color? underlineColor,
- TextInputType? keyboardType,
- bool? showPasswordType = false,
- bool? enabled = true,
- void onTap()?,
- bool? autoFocus = false,
- double? fontSize = 13.0,
- int? maxLength,
- TextAlign? textAlign = TextAlign.start,
- FocusNode? focusNode,
- Color? cursorColor,
- String? hint,
- String? errorText,
- FontWeight? fontWeight,
- bool? isRoundedBorer = false,
- Color? borderColor,
- double? borderRadius = 10,
- double? borderWidth = 1.0,
- bool? autovalidate = false,
- Color? disabledColor,
- TextInputAction? textInputAction,
- Widget? icon,
- Widget? suffixIcon,
- Widget? prefixIcon,
- String? suffixText,
- TextStyle? suffixStyle,
- String? prefixText,
- TextStyle? prefixStyle,
- ValueChanged<
String> ? onChanged, - ValueChanged<
String> ? onSubmitted, - ValueChanged<
String> ? onFieldSubmitted, - InputDecoration? decoration = const InputDecoration(),
- VoidCallback? onEditingComplete,
- TextCapitalization? textCaps,
- bool? autoCorrect,
- List<
TextInputFormatter> ? inputFormatters, - Iterable<
String> ? autofillHints, - bool isSearchTextField = false,
- bool isValidator = false,
- bool isEmail = false,
Implementation
AppTextField(
{super.key,
this.height = 40.0,
this.width,
this.floatingHint,
this.initialValue,
this.contentPadding = 5.0,
this.controller,
this.onSaved,
this.maxLines = 1,
this.minLines = 1,
this.validator,
this.hintColor,
this.textColor,
this.underlineColor,
this.keyboardType,
this.showPasswordType = false,
this.enabled = true,
this.onTap,
this.autoFocus = false,
this.fontSize = 13.0,
this.maxLength,
this.textAlign = TextAlign.start,
this.focusNode,
this.cursorColor,
this.hint,
this.errorText,
this.fontWeight,
this.isRoundedBorer = false,
this.borderColor,
this.borderRadius = 10,
this.borderWidth = 1.0,
this.autovalidate = false,
this.disabledColor,
this.textInputAction,
this.icon,
this.suffixIcon,
this.prefixIcon,
this.suffixText,
this.suffixStyle,
this.prefixText,
this.prefixStyle,
this.onChanged,
this.onSubmitted,
this.onFieldSubmitted,
this.decoration = const InputDecoration(),
this.onEditingComplete,
this.textCaps,
this.autoCorrect,
this.inputFormatters,
this.autofillHints,
this.isSearchTextField = false,
this.isValidator = false,
this.isEmail = false}) {
if (isRoundedBorer ?? false) {
// inputBorder = OutlineInputBorder(
// borderRadius: BorderRadius.circular(borderRadius!),
// borderSide: BorderSide(
// color: borderColor ?? Colors.white,
// width: borderWidth!,
// ));
}
}