fluttercommunity / fluttercommunity/flutter_webview_plugin

unnecessary rebuilds

オープン
#633 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Java
スター
1.5k
フォーク
938
PR マージ指標
30日以内にマージされた PR はありません

説明

## System info

Issue occurs on: iOS / Android / both
Plugin version: ^0.3.10+1
Flutter doctor output:

```
[✓] Flutter (Channel unknown, v1.13.5, on Mac OS X 10.15.2 19C57, locale en-US)

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 11.3)
[✓] Android Studio (version 3.5)
[✓] VS Code (version 1.41.1)
[✓] Connected device (1 available)

• No issues found!
```

## Steps to Reproduce

1. I notice this when my laptop gets overheated (both CPU and GPU) processing an uncomplicated single-webview (https://news.google.com) test app on Simulator.
2. Dart DevTool performance overlay also shows flutter rebuilds the page all the time every xx ms.
3. The problem is solved by switching to webview_flutter (javascriptMode: JavascriptMode.unrestricted) -- the page doesn't get rendered even when scrolling.

`import 'package:flutter_webview_plugin/flutter_webview_plugin.dart';
import 'package:flutter/material.dart';

void main() => runApp(MyApp1());

class MyApp1 extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
body: WebviewScaffold(
appBar: AppBar(),
url: "https://news.bing.com",
withJavascript: false,
withZoom: false,
withLocalStorage: false,
),
),
);
}
}`

## Logs

```
```

```
```

```
```

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

WebviewScaffoldを使用した最小限のDart例から始め、報告されたシミュレータ構成で動作を再現します。Flutter DevTools performance overlayを使用して繰り返し発生するrebuildを調査し、結果をwebview_flutterと比較します。不要なrebuildの動作を特定して解決できれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
dart, flutter
領域
mobile
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。