platform_detect icon indicating copy to clipboard operation
platform_detect copied to clipboard

Support for detecting Android and iOS, and browsers on those platforms

Open kankaristo opened this issue 5 years ago • 2 comments

Not sure if this is outside of the scope of this package, but it would be useful for us to detect Android and iOS as platforms, and which browser (Chrome, Safari, Firefox, Samsung's default browser, etc.) is used on those platforms.

For example, iOS doesn't support WebRTC on any other browser than Safari (all other browsers on iOS have to use WebView in their implementations, and it doesn't support WebRTC). So, being able to detect that the platform is iOS, and the browser is not Safari, we could tell the user to use Safari, if WebRTC support is required.

We're currently using a JavaScript library called Bowser, but being able to do these checks in "native" Dart would be very useful.

kankaristo avatar Sep 18 '19 09:09 kankaristo

Hmm, is this repo still being maintained @greglittlefield-wf ? this would be a great improvement.

twisstosin avatar Jun 12 '20 08:06 twisstosin

I also upvote this request. I have a flutter web app that I want only accessible from a desktop brower, but from a mobile browser I wish to create an automatic redirect to stores for the equivalent mobile app.

coastalgit avatar Mar 13 '21 00:03 coastalgit