Unfortunately, the webview_flutter
plugin does not currently support file uploads. You can track the progress of the feature request here.
In the meantime, you can use either the flutter_inappwebview or flutter_webview_plugin plugins as a workaround.
Using flutter_inappwebview
To use the flutter_inappwebview
plugin, add the following to your pubspec.yaml
file:
Then, import the plugin into your Dart code:
``` import 'package:flutter_inappwebview/flutter_inappwebview.dart'; ```Finally, create an InAppWebView
widget and set the onFileUpload
property:
Using flutter_webview_plugin
To use the flutter_webview_plugin
plugin, add the following to your pubspec.yaml
file:
Then, import the plugin into your Dart code:
``` import 'package:flutter_webview_plugin/flutter_webview_plugin.dart'; ```Finally, create a WebView
widget and set the onFileUpload
property: