Home > Software engineering >  Flutter Text Form Field Phone Number Mask
Flutter Text Form Field Phone Number Mask

Time:01-22

I want to print the phone number written in the text form field like this;

xxxx-xxx-xxxx

but I want to do this without using any packages. Can you help me?

CodePudding user response:

You can use the obscureText: true parameter like this:

            const Form(
          child: TextField(
            obscureText: true,
          ),
        ),

There is a video for this: enter image description here

  •  Tags:  
  • Related