How to open an application from a Flutter app?

后端 未结 5 1967
不思量自难忘°
不思量自难忘° 2020-11-30 03:29

I am developing a Flutter app, in which I need to show navigation to the user for a place. So, how can I open a map application from my Flutter app like we do using external

5条回答
  •  一整个雨季
    2020-11-30 04:12

    For iOS use, no browser involved, directly to apps:

    //waze 
    canLaunch("waze://") 
    launch("waze://?ll=${latitude},${longitude}&navigate=yes"); 
    //gmaps 
    canLaunch("comgooglemaps://") 
    launch("comgooglemaps://?saddr=${latitude},${longitude}&directionsmode=driving")
    

    What you need to do is to add to Info.plist:

    LSApplicationQueriesSchemes  
             
      comgooglemaps        
      waze     
    
    

提交回复
热议问题