EditText.phone constructor

EditText.phone({
  1. Key? key,
  2. required TextEditingController controller,
  3. String? hint = "Enter your phone",
  4. String? label = "Phone",
  5. TextStyle? textStyle,
  6. TextStyle? hintStyle,
  7. TextStyle? labelStyle,
  8. bool isOptional = false,
  9. dynamic onChange(
    1. String
    )?,
  10. int maxLength = 10,
})

Implementation

EditText.phone({
  Key? key,
  required TextEditingController controller,
  String? hint = "Enter your phone",
  String? label = "Phone",
  TextStyle? textStyle,
  TextStyle? hintStyle,
  TextStyle? labelStyle,
  bool isOptional = false,
  Function(String)? onChange,
  int maxLength = 10,
}) : this(
  key: key,
  controller: controller,
  hint: hint,
  label: label,
  inputType: TextInputType.phone,
  inputFormat: [FilteringTextInputFormatter.digitsOnly],
  textStyle: textStyle,
  hintStyle: hintStyle,
  labelStyle: labelStyle,
  maxLength: maxLength,
  isOptional: isOptional,
  onChange: onChange,
);