GithubHelp home page GithubHelp logo

yesc / flutterwebview Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ponnamkarthik/flutterwebview

0.0 0.0 0.0 7.05 MB

Flutter Plugin that Renders Native Webview as a widget in flutter

License: Other

Java 31.62% Objective-C 28.19% Dart 24.47% Ruby 15.71%

flutterwebview's Introduction

flutter_native_web

Native WebView as a widget in flutter

Inline WebView in flutter using AndroidView and UiKitView

Supported

  • Android
  • iOS

Note

  • onPageStarted, onPageFinished Only works with Android

Screenshot

Screenshot

How to Use

dependencies:
  flutter_native_web: "^1.0.2"
  
import 'package:flutter_native_web/flutterwebview.dart';
WebController webController;

FlutterWebView flutterWebView = new FlutterWebView(
  onWebCreated: onWebCreated,
);
 new Container(
    child: flutterWebViewString,
    height: 300.0,
    width: 500.0,
 ),
void onWebCreated(webController) {
    this.webController = webController;
    this.webController.loadUrl("https://facebook.com");
    this.webController.onPageStarted.listen((url) =>
        print("Loading $url")
    );
    this.webController.onPageFinished.listen((url) =>
        print("Finished loading $url")
    );
}

or

String html = '<body>Hello world! <a href="www.html5rocks.com">HTML5 rocks!';

void onWebCreated(webController) {
    this.webController = webController;
    this.webController.loadData(html);
    this.webController.onPageStarted.listen((url) =>
        print("Loading $url")
    );
    this.webController.onPageFinished.listen((url) =>
        print("Finished loading $url")
    );
}

Android

Ensure the following permission is present in your Android Manifest file, located in project /android/app/src/main/AndroidManifest.xml:

<uses-permission android:name="android.permission.INTERNET"/>

iOS

Opt-in to the embedded views preview by adding a boolean property to the app's Info.plist file with the key io.flutter.embedded_views_preview and the value YES.

	<key>io.flutter.embedded_views_preview</key>
	<string>YES</string>

Coming soon

  • JSInterface
  • more (suggest)

flutterwebview's People

Contributors

peeto avatar ponnamkarthik avatar vjpranay avatar yinsee avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.