iwebview_flutter 0.1.4

  • Readme
  • Changelog
  • Example
  • Installing
  • 83

WebView for flutter #

Base on webview_flutter, add some new features.

  • backgroundColor
  • onProgressChanged
  • shouldInterceptRequest: intercept request and load resource from local.
  • onScroll: listen webview scroll.

how to use #

  iwebview_flutter: ^latest version
      initialUrl: "https://www.google.com",
      javascriptMode: JavascriptMode.unrestricted,
      debuggingEnabled: true,
      onProgressChanged: (int p){//0-100
        setState(() {
          progress = p/100.0;
      onScroll(int x,int y){

      backgroundColor: Colors.red,
      shouldInterceptRequest: (String url) async {//replace google logo
        var googleLogo = "https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_160x56dp.png";
        if (url == googleLogo) {
          ByteData data = await rootBundle.load("assets/baidu.png");
          Uint8List bytes = Uint8List.view(data.buffer);
          return Response("image/png", null, bytes);
        return null;

0.1.4 #

fix bug for android webview background

0.1.3 #

add onScroll for webview

0.1.2 #

update for ios.

0.1.1 #

delete logs.

0.1.0 #

base on 0.3.15+1

  • onProgressChanged: Monitor loading progress for webview
  • backgroundColor: set background for webview
  • shouldInterceptRequest: intercept request and custom response(such us load local css/jss/png/jpeg)


webview_flutter_example #

Demonstrates how to use the webview_flutter plugin.

Getting Started #

For help getting started with Flutter, view our online documentation.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  iwebview_flutter: ^0.1.4

2. Install it

You can install packages from the command line:

with Flutter:

$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:iwebview_flutter/platform_interface.dart';
import 'package:iwebview_flutter/webview_flutter.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Feb 27, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.5
  • Flutter: 1.12.13+hotfix.8

Health suggestions

Format lib/platform_interface.dart.

Run flutter format to format lib/platform_interface.dart.

Format lib/src/webview_method_channel.dart.

Run flutter format to format lib/src/webview_method_channel.dart.

Format lib/webview_flutter.dart.

Run flutter format to format lib/webview_flutter.dart.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.68.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.8
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies