Skip to content

Mobile Number

A mobile number input is a specialized text field designed for capturing phone numbers in a standardized and user-friendly way. It combines country selection with number entry, ensuring correct formatting and reducing input errors.

Use this component when users must provide a valid phone or mobile number for authentication, verification, or contact purposes.

Common alternative names:
Phone Input, Telephone Field, Number Entry with Country Code


A mobile number input with hint text placeholder.


A mobile number input with a floating label that moves above the input when focused or filled.


A mobile number input in disabled state that cannot be interacted with.


PropertyTypeDescription
labelTextString?The label text displayed above the input field.
hintTextString?The hint text displayed inside the input field when empty.
validatorString? Function(String?)?Custom validator function for the mobile number input. If null, uses default validation.
inputFormattersList<TextInputFormatter>?Custom input formatters. If null, uses digits-only formatter with country-based length limiting.
textInputTypeTextInputTypeThe keyboard type for the input field. Defaults to TextInputType.phone.
autovalidateModeAutovalidateMode?When to automatically validate the input. Defaults to AutovalidateMode.onUserInteraction.
prefixWidgetWidget?Custom prefix widget to display before the country selector.
dialogTitleStringThe title displayed in the country picker dialog. Defaults to 'Select Country'.
searchHintStringThe hint text displayed in the country picker search field.
controllerTextEditingController?Text editing controller for the mobile number input.
prefixPaddingEdgeInsetsGeometryPadding around the prefix icon (country selector).
onCountrySelectedvoid Function(Country)?Callback function triggered when a country is selected.
isErrorboolWhether the input field should display in error state. Defaults to false.
isEnabledboolWhether the input field is enabled for user interaction. Defaults to true.