fluttercommunity / fluttercommunity/flutter_webview_plugin

unnecessary rebuilds

Aperta
#633 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Java
Stelle
1.5k
Fork
938
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

## 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

```
```

```
```

```
```

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.