1

I want to add Amazon Affiliate link in my flutter app. I want to open Amazon App when someone click on Button. I am using url launcher package. I have created the button which is opening amazon.com in browser.

ElevatedButton(
          onPressed: () {
            launch("https://www.amazon.com/");
          },
          child: Text("amazon"),
        ),
Richard Heap
  • 48,344
  • 9
  • 130
  • 112

1 Answers1

0

You can use external_app_launcher plugin

https://pub.dev/packages/external_app_launcher

await LaunchApp.isAppInstalled(
  androidPackageName: 'com.amazon.mShop.android.shopping'
  iosUrlScheme: 'amzn://'
);

Not sure about the amzn:// and com.amazon.mShop.android.shopping

But better, you can use the official amazon docs in case the user does not have the app installed

https://developer.amazon.com/de/docs/reports-promo/deeplink-to-the-amazon-client.html

Karim
  • 962
  • 7
  • 10