0

so how can i do that so that later on i can built and publish my app to playstore currently i have implemented to share only a demo link as simple text "Link to my app"

Share.share('Link to my app');

but i want to change it something like

Share.share('https://play.google.com/store/apps/details?id=com.whatsapp');
Anil Shrivastav
  • 105
  • 1
  • 14
  • Your app link is based on what package name you have provided at the start of creating the flutter project. The part ``htttps://play.google.com/store/apps/details?id=`` is constant and the ``id`` is your ``package`` name. You should replace it with the package name of your app. – OMi Shah Mar 07 '21 at 05:48

1 Answers1

1

The best approach is to make a http request to get link from a remote server. This way you can change it whenever you want it. Also. Because your using flutter. You can change the link based on platform. So if its on android put playstore link and if its on iOS put the appstore link.

SinaMN75
  • 6,742
  • 5
  • 28
  • 56
  • 1
    app URL remains the same so there is no point in changing it and making a request to get the link. – OMi Shah Mar 07 '21 at 06:26
  • 1
    @OMiShah maybe, but there are places like china, that there are multiple app markets. that would be useful there. – SinaMN75 Mar 07 '21 at 07:11