PhoneConfig constructor

PhoneConfig({
  1. Color focusedColor = const Color(0xFF6D59BD),
  2. Color enabledColor = const Color(0xFF6D59BD),
  3. EdgeInsetsGeometry errorPadding = const EdgeInsets.only(top: 14),
  4. double radius = 8,
  5. AutovalidateMode autovalidateMode = AutovalidateMode.onUserInteraction,
  6. TextInputAction textInputAction = TextInputAction.done,
  7. String? hintText = "Phone Number",
  8. double borderWidth = 2,
  9. int? errorTextMaxLength = 2,
  10. Color? backgroundColor,
  11. Decoration? decoration,
  12. FocusNode? focusNode,
  13. bool popUpErrorText = true,
  14. bool autoFocus = false,
  15. bool showCursor = false,
  16. Color errorColor = const Color(0xFFFF5494),
  17. TextStyle? errorStyle = const TextStyle(color: Color(0xFFFF5494), fontSize: 12),
  18. TextStyle? floatingLabelStyle,
  19. TextStyle? labelStyle,
  20. String? labelText,
  21. TextStyle textStyle = const TextStyle(color: Colors.black, fontSize: 16, fontWeight: FontWeight.w400),
  22. 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);