flutter_html_view 0.4.0

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • new50

flutter_html_view

Flutter Plugin to render html as a Widget

How to Use


dependencies:
  flutter_html_view: "^0.4.0"
  

import 'package:flutter_html_textview/flutter_html_textview.dart';

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

new HtmlTextView(data: html);

Thanks to

@Katran

[0.4.0]

  • Links are clickable now

[0.3.0]

  • Initial release

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:flutter_html_view/flutter_html_view.dart';

void main() => runApp(new MyApp());

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => new _MyAppState();
}

class _MyAppState extends State<MyApp> {

  @override
  initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {

    String html = '<h1>This is heading 1</h1> <h2>This is heading 2</h2><h3>This is heading 3</h3><h4>This is heading 4</h4><h5>This is heading 5</h5><h6>This is heading 6</h6><p><img alt="Test Image" src="https://i.ytimg.com/vi/RHLknisJ-Sg/maxresdefault.jpg" /></p><a href="https://google.com">Go Google</a> <a href="mailto:ponnamkarthik3@gmail.com">Mail to me</a> ';

    return new MaterialApp(
      home: new Scaffold(
        appBar: new AppBar(
          title: new Text('Plugin example app'),
        ),
        body: new SingleChildScrollView(
          child: new Center(
            child: new HtmlView(data: html,),
          ),
        ),
      ),
    );
  }
}

1. Depend on it

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


dependencies:
  flutter_html_view: "^0.4.0"

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter packages get

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

3. Import it

Now in your Dart code, you can use:


import 'package:flutter_html_view/flutter_html_view.dart';
        
Version Uploaded Documentation Archive
0.4.0 Apr 22, 2018 Go to the documentation of flutter_html_view 0.4.0 Download flutter_html_view 0.4.0 archive
0.3.1 Apr 17, 2018 Go to the documentation of flutter_html_view 0.3.1 Download flutter_html_view 0.3.1 archive
0.3.0 Apr 17, 2018 Go to the documentation of flutter_html_view 0.3.0 Download flutter_html_view 0.3.0 archive
0.2.7 Apr 17, 2018 Go to the documentation of flutter_html_view 0.2.7 Download flutter_html_view 0.2.7 archive

Analysis

We analyzed this package on Apr 23, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0-dev.49.0
  • pana: 0.10.6
  • Flutter: 0.3.2

Scores

Popularity:
Describes how popular the package is relative to other packages. [more]
0 / 100
Health:
Code health derived from static analysis. [more]
99 / 100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100 / 100
Overall score:
Weighted score of the above. [more]
50
Learn more about scoring.

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Suggestions

  • The description is too short.

    Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.

  • Package is pre-v1 release.

    While there is nothing inherently wrong with versions of 0.*.*, it usually means that the author is still experimenting with the general direction API.

  • Fix analysis and formatting issues.

    Analysis or formatting checks reported 4 hints.

    Run flutter format to format lib/flutter_html_text.dart.

    Run flutter format to format lib/flutter_html_view.dart.

    Similar analysis of the following files failed:

    • lib/html_parser.dart (hint)

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.28.0 <3.0.0
cached_network_image ^0.4.0 0.4.0
flutter 0.0.0
flutter_custom_tabs ^0.1.0 0.1.0
html ^0.13.3 0.13.3
Transitive dependencies
args 1.4.2
async 2.0.6
charcode 1.1.1
collection 1.14.6 1.14.9
convert 2.0.1
crypto 2.0.2+1
csslib 0.14.1
flutter_cache_manager 0.1.0
http 0.11.3+16
http_parser 3.1.1
logging 0.11.3+1
meta 1.1.2
path 1.5.1
path_provider 0.4.0
shared_preferences 0.4.1
sky_engine 0.0.99
source_span 1.4.0
string_scanner 1.0.2
synchronized 1.4.0
typed_data 1.1.5
url_launcher 3.0.0
utf 0.9.0+4
uuid 0.5.3 1.0.0
vector_math 2.0.6