close

How to Launching Google Maps and Apple Maps in Flutter

Hello Guys, how are you all? Hope you all are fine. In this tutorial, we are going to learn How to Launching Google Maps and Apple Maps in Flutter. So Without Wasting your time, Lets start this tutorial.

Question: How to launching Google Maps And Apple Maps In Flutter ?
Answer: Create New Flutter Project. Add url_launcher Plugin in pubspec.yaml file. Launching Google Maps and Apple Maps in Flutter.

Method 1

1. Creating a new Flutter project

First, we need to create a new Flutter project and then we will add our plugin into the pubspec.yaml file.

2. Adding the Plugin into Pubspec.yaml

Now open pubspec.yaml file and add the following plugin. Remember your version number can be different, currently the latest version of url_launcher is 5.2.5.

And after that run flutter packages get in the terminal. This command will install the url_launcher package and make it available to us for use.

3. Launching Google Maps and Apple Maps in Flutter

What if you want to open Google or Apple maps? Firstly, let’s define a lat and lng for wherever we want to open.

We can then create a new ListTile that takes advantage of this:

Method 2

you can install the packege url_launcher and use the code down below:

Now you can open google maps in your app just call this method:

Method 3

  1. Install url_launcher plugin
  2. write a code like below.
  3. that’s It.

So it’s all About This tutorial. Hope this above tutorial helped you a lot. Comment below Your thoughts and your queries. And Also Comment on your suggestion here.

Also Read

Leave a Comment

%d bloggers like this: