title: Open Google Maps app if available with flutter
body: <p>I'm trying to detect whether Google Maps app is installed on iOS, and if so, launch it, if not, launch Apple Maps. Here is what I have so far, but on my phone with Google Maps installed, it isn't detecting it and launching appropriately.</p>
  
  <p>Any ideas?</p>
  
  <pre><code>import 'package:url_launcher/url_launcher.dart';
  
  _launchMaps() async {
    String googleUrl =
      'comgooglemaps://?center=${trip.origLocationObj.lat},${trip.origLocationObj.lon}';
    String appleUrl =
      'https://maps.apple.com/?sll=${trip.origLocationObj.lat},${trip.origLocationObj.lon}';
    if (await canLaunch("comgooglemaps://")) {
      print('launching com googleUrl');
      await launch(googleUrl);
    } else if (await canLaunch(appleUrl)) {
      print('launching apple url');
      await launch(appleUrl);
    } else {
      throw 'Could not launch url';
    }
  }
  </code></pre>
  
  <p>I pulled the url scheme from here: <a href="https://stackoverflow.com/questions/32772727/how-would-i-be-able-to-open-google-maps-when-i-press-a-button-in-my-app">How would I be able to open google maps when I press a button in my app?</a></p>