Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

171 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WebView for Flutter

跨进程渲染的实践技术分享

This plugin is based on webview_flutter.

And expanded a remote-hybird-webview, for avoid the impact of webview on the main process and decrease main-process's memory usage.

For now, it only supported on android.

Branches Tip

stable : can use at product.

main : for development.

dev/feat : child branch of main.

TODO

-> refine input module.

-> view state recover.

-> view resize adapter.

...

Usage

Here just introduct remote usage, for common usage please check webview_flutter. :)

Using Remote-Hybrid WebView

For example:

```java
class YourMainActivity extends RemoteWebActivity{
    ...
}

```

```dart
import 'dart:io';

import 'package:webview_flutter/webview_flutter.dart';

class WebViewExample extends StatefulWidget {
  @override
  WebViewExampleState createState() => WebViewExampleState();
}

class WebViewExampleState extends State<WebViewExample> {
  @override
  void initState() {
    super.initState();
        // Enable remote-hybrid web view.
if (Platform.isAndroid) WebView.platform = TextureAndroidWebView();
  }

  @override
  Widget build(BuildContext context) {
    return WebView(
      initialUrl: 'https://flutter.dev',
    );
  }
}
```

About

No description, website, or topics provided.

Resources

Stars

6 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages