flutter_web_view 0.0.6

  • Readme
  • Changelog
  • Example
  • Installing
  • 91

Flutter Web View #

A web view plugin for Flutter. Works with iOS and Android

Features

  • [x] Load Web Pages
  • [x] Reload/Load new pages while WebView still active
  • [x] Listen for Redirects
  • [x] Add buttons to a navigation bar
  • [x] Receive call backs for nav buttons pressed
  • [x] WebView loading callbacks
  • [x] Supports custom nav bar & button colors ( ios only for now )
  • [ ] Advanced nav bar support ( position , enable, disable buttons )
  • [ ] Support for nav bar icon buttons
  • [ ] WebView history support
  • [ ] Android back button customization
  • [ ] Built in controls for WebView navigation

Feature requests welcome.

Android Support #

To use on Android, make sure to add the the following in your AndroidManifest.xml

<activity android:name="com.apptreesoftware.flutterwebview.WebViewActivity">
</activity>

Example Usage #

flutterWebView.launch(
        "https://apptreesoftware.com",
        headers: {
          "X-SOME-HEADER": "MyCustomHeader",
        },
        javaScriptEnabled: false,
        toolbarActions: [
          new ToolbarAction("Dismiss", 1),
          new ToolbarAction("Reload", 2)
        ],
        barColor: Colors.green,
        tintColor: Colors.white);
    flutterWebView.onToolbarAction.listen((identifier) {
      switch (identifier) {
        case 1:
          flutterWebView.dismiss();
          break;
        case 2:
          reload();
          break;
      }
    });
    flutterWebView.listenForRedirect("mobile://test.com", true);

    flutterWebView.onWebViewDidStartLoading.listen((url) {
      setState(() => _isLoading = true);
    });
    flutterWebView.onWebViewDidLoad.listen((url) {
      setState(() => _isLoading = false);
    });
    flutterWebView.onRedirect.listen((url) {
      flutterWebView.dismiss();
      setState(() => _redirectedToUrl = url);
    });

[0.0.1] - 09-25-17

  • Support for full screen web view
  • Supports nav bar with actions
  • Supports listening for redirect events
  • Control javascript and media playback support
  • Supports loading new pages ( post initialization )
  • iOS & Android

[0.0.2] - 11-07-17

[0.0.4] - 11-12-18

  • Fix build errors after gradle update

[0.0.5] - 11-12-18

  • Fix crash after upgrading to Flutter 0.11.3

[0.0.6] - 03-04-19

  • Upgrade kotlin plugin version for compatibility with latest gradle

example/README.md

flutter_web_view_example #

Demonstrates how to use the flutter_web_view 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:


dependencies:
  flutter_web_view: ^0.0.6

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:flutter_web_view/flutter_web_view.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
87
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
90
Overall:
Weighted score of the above. [more]
91
Learn more about scoring.

We analyzed this package on Oct 11, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.5.1
  • pana: 0.12.21
  • Flutter: 1.9.1+hotfix.4

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Maintenance suggestions

Package is pre-v0.1 release. (-10 points)

While nothing is inherently wrong with versions of 0.0.*, it might mean that the author is still experimenting with the general direction of the API.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.7
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8