Search code examples
androidflutterdarturl-launcher

Flutter url_launcher ignores number sign(#) when call


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');
          },