Code Monkey home page Code Monkey logo

flutterhtmlview's Introduction

flutter_html_view

Flutter Plugin to render html as a Widget,

Refer this for full support of inline webview for android and iOS

Flutter has no default support to render html so this package helps you to render your html to native widgets

  • Video tag support added
  • Links are clickable now

Supported Tags

  • p
  • em
  • b
  • img with html,file and BASE64
  • video
  • h1, h2, h3, h4, h5, h6

Note

  • This plugin converts some of the html tags to flutter widgets
  • This plugin does't support rendering full html code (there is no built in support for web rendering in flutter)

How to Use

dependencies:
  flutter_html_view:
    git: https://github.com/reemii-cn/FlutterHtmlView.git
  
import 'package:flutter_html_view/flutter_html_view.dart';

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

new HtmlView(
  data: html,
  baseURL: "", // optional, type String
  onLaunchFail: (url) { // optional, type Function
    print("launch $url failed");
  },
  scrollable: false, //false to use MarksownBody and true to use Marksown
)

iOS

Warning: The video player is not functional on iOS simulators. An iOS device must be used during development/testing.

Add the following entry to your Info.plist file, located in <project root>/ios/Runner/Info.plist:

<key>NSAppTransportSecurity</key>
<dict>
  <key>NSAllowsArbitraryLoads</key>
  <true/>
</dict>

This entry allows your app to access video files by URL.

Android

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

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

Thanks to

@Katran

flutterhtmlview's People

Contributors

ponnamkarthik avatar roughindustries avatar nicqchen avatar matejm avatar gofur avatar h2oiswater avatar gidrek avatar magillus avatar scheckmedia avatar zigapk avatar byr-gdp avatar jianpeng9 avatar marekchen avatar

Watchers

James Cloos 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.