diff --git a/packages/webview_flutter/android/src/main/java/io/flutter/plugins/webviewflutter/InputAwareWebView.java b/packages/webview_flutter/android/src/main/java/io/flutter/plugins/webviewflutter/InputAwareWebView.java index 477eefc3565a..7cf280e15d8c 100644 --- a/packages/webview_flutter/android/src/main/java/io/flutter/plugins/webviewflutter/InputAwareWebView.java +++ b/packages/webview_flutter/android/src/main/java/io/flutter/plugins/webviewflutter/InputAwareWebView.java @@ -31,6 +31,7 @@ final class InputAwareWebView extends WebView { InputAwareWebView(Context context, View containerView) { super(context); this.containerView = containerView; + setBackgroundColor(0x00000000); } void setContainerView(View containerView) { diff --git a/packages/webview_flutter/example/lib/main.dart b/packages/webview_flutter/example/lib/main.dart index 59c87a25dedf..1bb836fa1634 100644 --- a/packages/webview_flutter/example/lib/main.dart +++ b/packages/webview_flutter/example/lib/main.dart @@ -12,11 +12,11 @@ import 'package:webview_flutter/webview_flutter.dart'; void main() => runApp(MaterialApp(home: WebViewExample())); const String kNavigationExamplePage = ''' - + Navigation Delegate Example - +

-The navigation delegate is set to block navigation to the youtube website. +The navigation delegate is set to block navigation to the youtube website, and as the webview background is transparent, you can see scaffold background.