Flutter url_launcher ignores number sign(#) when call

Issue

I’m using url_launcher in my app. When I dial numbers that includes a number sign like "*123#" it ignores the number sign and dial just *123

Solution

You should use Uri.encodeComponent to encode # too

onPressed: () {
        String no = Uri.encodeComponent('*123#');
        launch('tel:$no');
      },

Answered By – Muhtar

Answer Checked By – Jay B. (FlutterFixes Admin)

Leave a Reply

Your email address will not be published. Required fields are marked *