skip to Main Content

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?

2

Answers


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

    Login or Signup to reply.
  2. You can use URL launcher in every where you want, like this:

    Center(
      child: TextButton(
          onPressed: () => launch("tel://21213123123"),
          child: Text("Call me")),
      ),
    ) 
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search