1

How can I limit a widget to be shown only on a platform or a build?

Eg I would only show Amazon login on the Amazon app store, an Apple login on iOS etc.

I am also unsure of the approach, should I have a different build for these platforms? Eg release-amazon, release-ios etc

giorgio79
  • 3,787
  • 9
  • 53
  • 85

1 Answers1

2

You might be able to find some info from the Platform class:

https://api.flutter.dev/flutter/dart-io/Platform-class.html

Can get Platform, and maybe be able to get some info around Amazon store from the environment variables.

You can find some additional info on how to detect Amazon in this thread: https://stackoverflow.com/a/61547707/10232

mikechambers
  • 3,047
  • 3
  • 24
  • 31