I have built a web app in Flutter and I want to check where the app is running.
My app runs in the normal browser, in Microsoft Teams and in a WebView within another Flutter app.
In all cases the kIsWeb bool is true.
With the device_info_plus package I only get errors…
And with the web_browser_detect (on iOS) only safari back as the browser (even if it is in the webview)
Does anyone know a solution?
I think you are needing to look at
userAgent. See this answer:
or this answer
How to get device user agent information in Flutter
Answered By – chongman
Answer Checked By – Mary Flores (FlutterFixes Volunteer)