title: I want to launch WhatsApp application from my flutter application
body: <p>I am using this dependency url_launcher: ^5.4.1 in my project to launch whatsapp through my flutter application but when i am pressing button to launch application it is not working but showing an error message on emulator that could not open the link.
  given below is the code with function i am using to launch whatsapp.</p>
  <pre><code>import 'package:flutter/material.dart';
  import 'package:url_launcher/url_launcher.dart';
  import 'dart:io';
  
  
  void main() =&gt; runApp(Wapp());
  
  class Wapp extends StatelessWidget {
    // This widget is the root of your application.
    @override
    Widget build(BuildContext context) {
      return MaterialApp(
        debugShowCheckedModeBanner: false,
        title: 'Flutter Demo',
        theme: ThemeData(
            primarySwatch: Colors.orange,
        ),
        home: MyHomePage(title: 'Flutter Demo Home Page'),
      );
    }
  }
  
  class MyHomePage extends StatefulWidget {
    MyHomePage({Key key, this.title}) : super(key: key);
  
  final String title;
  
    @override
    _MyHomePageState createState() =&gt; _MyHomePageState();
  }
  
  class _MyHomePageState extends State&lt;MyHomePage&gt; {
   void launchWhatsApp(
      {@required int phone,
      @required String message,
      }) async {
    String url() {
      if (Platform.isAndroid) {
        return &quot;whatsapp://wa.me/$phone:03452121308:/?text=${Uri.parse(message)}&quot;;
      } else {
        return &quot;whatsapp://send?   phone=$phone&amp;text=${Uri.parse(message)}&quot;;
      }
    }
  
    if (await canLaunch(url())) {
      await launch(url());
    } else {
      throw 'Could not launch ${url()}';
    }
  }
  
  
  Widget build(BuildContext context){
    return Scaffold(
      appBar: AppBar(
        title: Text(&quot;Home&quot;), 
      ),
  
    body: Center(
      child: RaisedButton(
        
        color: Colors.orange,
        textColor: Colors.black,
        padding: EdgeInsets.symmetric(vertical: 20.0, horizontal: 60.0),
        highlightColor: Colors.green,
        onPressed: () {
          launchWhatsApp(phone: 03452121308, message: 'Hello');
        },
        child: Text(&quot;Place Your Order&quot;,style: TextStyle(
            
            fontWeight: FontWeight.bold,
            fontSize: 15
            
          )
        )
      )
    )
  
    );
  }
  
  }
  </code></pre>