fluttercommunity / fluttercommunity/flutter_webview_plugin

unnecessary rebuilds

Open
#633 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
1.5k
Forks
938
PR merge metrics
No merged PRs in 30d

Description

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

```
```

```
```

```
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.