phone_number_controller 1.0.1 phone_number_controller: ^1.0.1 copied to clipboard
A TextEditingController formatting international phone numbers as you type them.
phone_number_controller #
This plugin provides a TextEditingController that formats international phone numbers as you type them.
Demo #
Usage #
Two steps:
- In a stateful widget, define a
PhoneNumberController
:
final _controller = PhoneNumberController(countryCode: 'us');
- When building the text field, specify the controller:
TextFormField(
controller: _controller,
keyboardType: TextInputType.phone,
...
);