InputField.phone constructor
InputField.phone({
- Key? key,
- TextEditingController? controller,
- String hintText = 'Phone number',
- ValueChanged<
String> ? onChanged, - ValueChanged<
String> ? onSubmitted, - String? errorText,
- bool enabled = true,
Implementation
factory InputField.phone({
Key? key,
TextEditingController? controller,
String hintText = 'Phone number',
ValueChanged<String>? onChanged,
ValueChanged<String>? onSubmitted,
String? errorText,
bool enabled = true,
}) {
return InputField(
key: key,
controller: controller,
hintText: hintText,
keyboardType: TextInputType.phone,
textInputAction: TextInputAction.done,
prefixIcon: Icons.phone_outlined,
onChanged: onChanged,
onSubmitted: onSubmitted,
errorText: errorText,
enabled: enabled,
inputFormatters: [
FilteringTextInputFormatter.digitsOnly,
PhoneNumberFormatter(),
],
);
}