Is there any possibility to put WebView
(webview_flutter) inside a ListView
without assigning its dimensions but automatically adopt its height. Only working solution I found is to put WebView in Container by assigning its height but I dont want to assign any height I just want it to occupy height according to its content..
I have tried so many solutions including Expanded
for this but getting error about infinite height . Any solution?
Until now you can not as I expect...but you can include a scroll inside your webview widget
import those libraries:
import 'package:flutter/gestures.dart';
import 'package:flutter/foundation.dart';
add this line to your webview widget:
gestureRecognizers: Set()..add(Factory<VerticalDragGestureRecognizer>(()=>VerticalDragGestureRecognizer())),
and you are done :)
EDIT the flutter_widget_from_html plugin is now supporting the webview and iframe and you can use it insted of the web_view plugin and without the need of using a height
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With