Flutter Want to navigate to google maps


I have a set of locations. Starting point > Mid Point > Ending Point.
I want to create a button in which when the user presses the button it will redirect the user to the actual google maps direction and it should set the direction automatically on google maps.
how can I make it work?


use url_launcher package and set latitudeopen and longitude of origin and destination location, then open this url


Url example :



import 'package:url_launcher/url_launcher.dart';
       onTap: ()=> launch('http://maps.google.com/maps?saddr=41.3999625,2.1958264&daddr=41.3942644,2.1885308'),
       child: Text('open map'),

Answered By – Mehdi

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published