Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to achieve Flutter WebView Scale to Fit

Tags:

flutter

dart

I want to achieve something like this in flutter webview. enter image description here

but getting something like this. enter image description here

how Can I achieve that first image kind of webview which will scale down the page.

like image 896
Vishal Ghosh Avatar asked Jan 21 '26 12:01

Vishal Ghosh


1 Answers

You will have to set useWidePortView to true.

Widget build(BuildContext context) {
   return WebviewScaffold(
   initialChild: Loading(),
   appBar: AppBar(
     title: Text(title),
   ),
   url: url,
   withZoom: true,
   scrollBar: true,
   withJavascript: true,
   useWideViewPort: true,
 );
}
like image 172
Shobhit Gupta Avatar answered Jan 27 '26 01:01

Shobhit Gupta