Home > Net >  I have a button in my Flutter project that I want the phone number to appear when pressed by the use
I have a button in my Flutter project that I want the phone number to appear when pressed by the use

Time:11-20

I have a button in my Flutter project that I want the phone number to appear when it's pressed by the user, and when the number appears, the user can copy the number and use it, or when pressing the button, it goes to a direct call process with the phone number

Is there a way or a widget by which I can achieve this?

CodePudding user response:

You can use URL launcher in every where you want, like this:

Center(
  child: TextButton(
      onPressed: () => launch("tel://21213123123"),
      child: Text("Call me")),
  ),
) 

CodePudding user response:

you can use url_launcher to direct call process with the phone number, or send sms as you want

  • Related