Reputation: 31
I want to inactivate the white background when I pull the screen up or down. Thank you.
import 'package:flutter/material.dart';
import 'package:webview_flutter/webview_flutter.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
title: 'Welcome to Flutter',
home: Scaffold(
body: WebView(
initialUrl: "https://www.medivizyon.com.tr/in5",
javascriptMode: JavascriptMode.unrestricted,
initialMediaPlaybackPolicy: AutoMediaPlaybackPolicy.always_allow,
allowsInlineMediaPlayback: true,
),
),
);
}
}
Upvotes: 3
Views: 2667
Reputation: 3429
The webview_flutter
plugin doesn't have an option to disable iOS bounce effect.
You can use my flutter_inappwebview plugin and set the iOS-specific WebView option disallowOverScroll: true
. This way it will disable the bouncing of the WebView when the scrolling has reached an edge of the content.
Code example:
child: InAppWebView(
initialUrlRequest: URLRequest(url: Uri.parse("https://yourwebsite.com")),
initialOptions: InAppWebViewGroupOptions(
ios: IOSInAppWebViewOptions(
disallowOverScroll: true
)
),
)
Upvotes: 2