瀏覽代碼

Merge pull request #233 from ente-io/webview_transparent_bg

Set webview bg as transparent
Vishnu Mohandas 3 年之前
父節點
當前提交
bfc24d3370
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      lib/ui/web_page.dart

+ 3 - 0
lib/ui/web_page.dart

@@ -22,8 +22,11 @@ class _WebPageState extends State<WebPage> {
         title: Text(widget.title),
         actions: [_hasLoadedPage ? Container() : loadWidget],
       ),
+      backgroundColor: Colors.transparent,
       body: InAppWebView(
         initialUrlRequest: URLRequest(url: Uri.parse(widget.url)),
+        initialOptions: InAppWebViewGroupOptions(
+            crossPlatform: InAppWebViewOptions(transparentBackground: true)),
         onLoadStop: (c, url) {
           setState(() {
             _hasLoadedPage = true;