Search code examples
flutterflutterwebviewplugin

Flutter Web View - features?


Is it possible to make flutter WebView in flutter that can handle features like chrome browser example

  • uploading files
  • upload image/Video from (Gallery & camera)
  • geolocations
  • Receive Notifications

as we get these features in chrome browser can we make similar types of app using flutter?

I tried nothing, this is just a general question.


Solution

  • It sounds like your goal is to implement a web application, create a mobile application with purely a WebView to render the web application, and then slowly migrate the web application to Flutter over time?

    In order for mobile applications to access files & media the user must explicitly grant permission at runtime. While you could do this when your application starts and maybe work around this constraint it's going to be a poor user experience and a very difficult obsticle to overcome.

    The same permission constraint applies to geolocation.

    Generally you want to associate permission requests with actions or workflows in your application where it becomes obvious to the user why you're requesting permission. This is going to be very difficult to achieve with purely a WebView wrapping a web application. If you were to go this direction, you'll need to implement some bi-directional communication with the embedded web application to trigger events (e.g. let the web application know permission has been granted/denied, send an event to the Flutter application to trigger a permission request, etc).

    I'd advise against you pursuing this route soley based on this permission constraint.

    It sounds like you eventually plan on migrating the web application entirely to Flutter over time. If the web application doesn't currently exist, one path forward would be to start with Flutter and target iOS, Android, and web in your project. Alternatively, if the web application already exists, then maybe you'd be better off with the React Native framework to reuse already existing web components.

    In summary, while I think this may be technically possible I'd highly recommend against wasting time, effort, and sanity for the above reasons.