PhoneConfig constructor
PhoneConfig({
- Color focusedColor = const Color(0xFF6D59BD),
- Color enabledColor = const Color(0xFF6D59BD),
- EdgeInsetsGeometry errorPadding = const EdgeInsets.only(top: 14),
- double radius = 8,
- AutovalidateMode autovalidateMode = AutovalidateMode.onUserInteraction,
- TextInputAction textInputAction = TextInputAction.done,
- String? hintText = "Phone Number",
- double borderWidth = 2,
- int? errorTextMaxLength = 2,
- Color? backgroundColor,
- Decoration? decoration,
- FocusNode? focusNode,
- bool popUpErrorText = true,
- bool autoFocus = false,
- bool showCursor = false,
- Color errorColor = const Color(0xFFFF5494),
- TextStyle? errorStyle = const TextStyle(color: Color(0xFFFF5494), fontSize: 12),
- TextStyle? floatingLabelStyle,
- TextStyle? labelStyle,
- String? labelText,
- TextStyle textStyle = const TextStyle(color: Colors.black, fontSize: 16, fontWeight: FontWeight.w400),
- TextStyle? hintStyle,
Implementation
PhoneConfig(
{this.focusedColor = const Color(0xFF6D59BD),
this.enabledColor = const Color(0xFF6D59BD),
this.errorPadding = const EdgeInsets.only(top: 14),
this.radius = 8,
this.autovalidateMode = AutovalidateMode.onUserInteraction,
this.textInputAction = TextInputAction.done,
this.hintText = "Phone Number",
this.borderWidth = 2,
this.errorTextMaxLength = 2,
this.backgroundColor,
this.decoration,
this.focusNode,
this.popUpErrorText = true,
this.autoFocus = false,
this.showCursor = false,
this.errorColor = const Color(0xFFFF5494),
this.errorStyle = const TextStyle(color: Color(0xFFFF5494), fontSize: 12),
this.floatingLabelStyle,
this.labelStyle,
this.labelText,
this.textStyle = const TextStyle(
color: Colors.black, fontSize: 16, fontWeight: FontWeight.w400),
TextStyle? hintStyle})
: hintStyle = hintStyle ??
TextStyle(
color: Colors.black.withOpacity(0.5),
fontSize: 16,
fontWeight: FontWeight.w400);