flutter_html_textview 0.2.6

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

flutter_html_textview

Flutter Plugin to render html as a Widget

How to Use


dependencies:
  flutter_html_textview: "^0.2.6"
  

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.0.1] - TODO: Add release date.

  • TODO: Describe initial release.

example/lib/main.dart

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

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

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

class _MyAppState extends State<MyApp> {
  String _platformVersion = 'Unknown';

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

  // Platform messages are asynchronous, so we initialize in an async method.
  initPlatformState() async {

  }

  @override
  Widget build(BuildContext context) {

    String lorem = '<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>';
//    String lorem = "<em>Kacey Fahey, Developer Marketing, Google Play</em>\n\n<p>\nCongratulations to the latest <a href=\"https://play.google.com/store/apps/topic?id=campaign_editorial_3002b4f_android_excellence_apps&hl=en\">apps</a> and <a href=\"https://play.google.com/store/apps/topic?id=campaign_editorial_3002b50_android_excellence_games&hl=en\">games</a> featured in the Android Excellence program on Google Play. As a reminder, these collections are refreshed every three months and recognize apps and games that set the bar for high quality, great user experience, and strong technical performance. \n</p>\n<p>\n<a href=\"https://3.bp.blogspot.com/-WKwBKUfq5lA/WsUNQfbmhuI/AAAAAAAAFMA/KH6RE2zupHMzTb2fAm_4jsjAbP8L8lr4wCLcBGAs/s1600/image1.jpg\" imageanchor=\"1\" ><img id=\"imageOne\" border=\"0\" src=\"https://3.bp.blogspot.com/-WKwBKUfq5lA/WsUNQfbmhuI/AAAAAAAAFMA/KH6RE2zupHMzTb2fAm_4jsjAbP8L8lr4wCLcBGAs/s1600/image1.jpg\" data-original-width=\"1024\" data-original-height=\"592\" /></a>\n</p>\n<p>\nIf you're looking for some new apps, here are a few highlights.\n</p><ul>\n\n<li><a href=\"https://play.google.com/store/apps/details?id=com.adobe.lrmobile\">Adobe Photoshop Lightroom CC</a>: Capture, edit, and share your photos with the power of Lightroom on your mobile device. Use presets for quick and easy edits, or dive in with the advanced editing tools.\n<li><a href=\"https://play.google.com/store/apps/details?id=se.perigee.android.seven\">Seven - 7 Minute Workout Training Challenge</a>: Use this app to fit seven minute workouts into your busy lifestyle. Grab your phone, or even your Wear OS device to work out anywhere and anytime. Keep it up to earn achievements and join the 7 Club for even more support. \n<li><a href=\"https://play.google.com/store/apps/details?id=com.sololearn\">SoloLearn: Learn to Code for Free</a>: Learn one of many new coding languages by joining a community of millions. Tap in to the 24/7 peer support, or create your own lessons to become a community influencer.</li></ul>\n\n<p>\nHere are a few of our favorite new games joining the collection.\n</p><ul>\n\n<li><a href=\"https://play.google.com/store/apps/details?id=com.fanatee.cody\">CodyCross: Crossword Puzzles</a>: Try this game for a fun new style of crossword puzzles. Play for free on adventure mode or subscribe for special themed packs, varying difficulty levels and fresh content added weekly.\n<li><a href=\"https://play.google.com/store/apps/details?id=com.kabam.marvelbattle\">MARVEL Contest of Champions</a>: Play with your favorite Marvel Super Heroes and Super Villians in iconic locations from the Marvel Universe. Assemble your team of champions to play through the exciting storyline and even build alliances with your friends.\n<li><a href=\"https://play.google.com/store/apps/details?id=com.etermax.orbital1\">Orbital 1</a>: Test your skills in this real-time multiplayer game with beautiful 3D graphics. Collect and upgrade fighters and weapons to build out your perfect squad for quick battles and new daily quests.</li></ul>\n\n<p>\nSee the full list of Android Excellence apps and games.\n</p>\n\n<table>\n  <tr>\n   <td><strong><span style=\"text-decoration:underline;\">New Android Excellence apps</span></strong>\n   </td>\n   <td><strong><span style=\"text-decoration:underline;\">New Android Excellence games</span></strong>\n   </td>\n  </tr>\n  <tr>\n   <td><a href=\"https://play.google.com/store/apps/details?id=com.adobe.lrmobile\">Adobe Photoshop Lightroom CC</a>\n<p>\n<a href=\"https://play.google.com/store/apps/details?id=com.dashlane\">Dashlane</a>\n<p>\n<a href=\"https://play.google.com/store/apps/details?id=com.hostelworld.app\">Holstelworld</a>\n<p>\n<a href=\"https://play.google.com/store/apps/details?id=com.polydice.icook\">iCook</a>\n<p>\n<a href=\"https://play.google.com/store/apps/details?id=com.callpod.android_apps.keeper\">Keeper Password Manager</a>\n<p>\n<a href=\"https://play.google.com/store/apps/details?id=com.kii.safe\">Keepsafe Photo Vault</a>\n<p>\n<a href=\"https://play.google.com/store/apps/details?id=com.mobisystems.office\">Mobisystems OfficeSuite</a>\n<p>\n<a href=\"https://play.google.com/store/apps/details?id=com.roidapp.photogrid&ddl=1&pcampaignid=web_ddl_1&e=-EnableAppDetailsPageRedesign\">PhotoGrid</a>\n<p>\n<a href=\"https://play.google.com/store/apps/details?id=com.runtastic.android.results.lite&sticky_source_country=US&e=-EnableAppDetailsPageRedesign\">Runtastic Results</a>\n<p>\n<a href=\"https://play.google.com/store/apps/details?id=se.perigee.android.seven\">Seven - 7 Minute Workout Training Challenge</a>\n<p>\n<a href=\"https://play.google.com/store/apps/details?id=com.sololearn\">SoloLearn: Learn to Code for Free</a>\n<p>\n<a href=\"https://play.google.com/store/apps/details?id=com.mxdata.tube.Market\">Tube Map</a>\n<p>\n<a href=\"https://play.google.com/store/apps/details?id=cn.wps.moffice_eng\">WPS Office</a>\n   </td>\n   <td><a href=\"https://play.google.com/store/apps/details?id=com.rovio.baba&hl=en&e=-EnableAppDetailsPageRedesign\">Angry Birds 2</a>\n<p>\n<a href=\"https://play.google.com/store/apps/details?id=com.YoStarJP.AzurLane&hl=en&e=-EnableAppDetailsPageRedesign\">Azur Lane</a> アズールレーン\n<p>\n<a href=\"https://play.google.com/store/apps/details?id=com.fanatee.cody\">CodyCross</a>\n<p>\n<a href=\"https://play.google.com/store/apps/details?id=com.pikpok.dr2.play&e=-EnableAppDetailsPageRedesign\">Into the Dead 2</a>\n<p>\n<a href=\"https://play.google.com/store/apps/details?id=com.sinyee.babybus.restaurant\">Little Panda Restaurant</a>\n<p>\n<a href=\"https://play.google.com/store/apps/details?id=com.kabam.marvelbattle\">MARVEL Contest of Champions</a>\n<p>\n<a href=\"https://play.google.com/store/apps/details?id=com.etermax.orbital1\">Orbital 1</a>\n<p>\n<a href=\"https://play.google.com/store/apps/details?id=com.yodo1.roda\">Rooms of Doom</a>\n<p>\n<a href=\"https://play.google.com/store/apps/details?id=pine.game.skydancer\">Sky Dancer Run</a>\n<p>\n<a href=\"https://play.google.com/store/apps/details?id=com.protostar.sling\">Sling Kong</a>\n<p>\n<a href=\"https://play.google.com/store/apps/details?id=com.ChillyRoom.DungeonShooter\">Soul Knight</a>\n   </td>\n  </tr>\n</table>\n\n\n<p>\nExplore other great apps and games in the <a href=\"https://play.google.com/store/apps/topic?id=editors_choice\">Editors' Choice</a> section on Google Play and <a href=\"https://developer.android.com/distribute/best-practices/index.html\">discover best practices</a> to help you build quality apps and games.\n</p>\n<center>\n<p>\n How useful did you find this blogpost?\n<br>\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLScLTlzFd_aV-3rAdBqO1QxwCsuAcDCIM6fJFXyNcyf7zElVXg/viewform?usp=pp_url&entry.753333049=1%E2%98%85+%E2%80%93+Not+at+all&entry.2056663615&entry.646747778=AndroidExcellencerefresh-10/27\" style=\"color:gold;\">★</a> <a href=\"https://docs.google.com/forms/d/e/1FAIpQLScLTlzFd_aV-3rAdBqO1QxwCsuAcDCIM6fJFXyNcyf7zElVXg/viewform?usp=pp_url&entry.753333049=2%E2%98%85+%E2%80%93+Not+very&entry.2056663615&entry.646747778=AndroidExcellencerefresh-10/27\" style=\"color:gold;\">★</a> <a href=\"https://docs.google.com/forms/d/e/1FAIpQLScLTlzFd_aV-3rAdBqO1QxwCsuAcDCIM6fJFXyNcyf7zElVXg/viewform?usp=pp_url&entry.753333049=3%E2%98%85+%E2%80%93+Somewhat&entry.2056663615&entry.646747778=AndroidExcellencerefresh-10/27\" style=\"color:gold;\">★</a> <a href=\"https://docs.google.com/forms/d/e/1FAIpQLScLTlzFd_aV-3rAdBqO1QxwCsuAcDCIM6fJFXyNcyf7zElVXg/viewform?usp=pp_url&entry.753333049=4%E2%98%85+%E2%80%93+Very&entry.2056663615&entry.646747778=AndroidExcellencerefresh-10/27\" style=\"color:gold;\">★</a> <a href=\"https://docs.google.com/forms/d/e/1FAIpQLScLTlzFd_aV-3rAdBqO1QxwCsuAcDCIM6fJFXyNcyf7zElVXg/viewform?usp=pp_url&entry.753333049=5%E2%98%85+%E2%80%93+Extremely&entry.2056663615&entry.646747778=AndroidExcellencerefresh-10/27\" style=\"color:gold;\">★</a>\n</p>\n\n<p>\n<a href=\"https://2.bp.blogspot.com/-eKVHlD1nQJE/WsUNzScG80I/AAAAAAAAFMI/KcXe_FGOk84wJq0PEqdvGAYMN4jJqIBsACLcBGAs/s1600/image2.png\" imageanchor=\"1\" ><img id=\"imageTwo\" border=\"0\" src=\"https://2.bp.blogspot.com/-eKVHlD1nQJE/WsUNzScG80I/AAAAAAAAFMI/KcXe_FGOk84wJq0PEqdvGAYMN4jJqIBsACLcBGAs/s1600/image2.png\" data-original-width=\"499\" data-original-height=\"281\" /></a>\n</p>\n</center>\n\n<style>\n#imageOne {\ndisplay: block;\nwidth: 90%;\nmargin: 10px auto;\npadding: 0;\n}\n\n#imageTwo {\ndisplay: block;\nwidth: 40%;\nmargin: 0px auto 0px auto;\npadding: 0;\n}\n\n#caption {\nfont-size: 85%;\nfont-style: italic;\ntext-align: center;\nmargin: 5px 0px 10px 0px\n}\n\ntable {\nline-height: 1.5em;\n}\n</style>";

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

Use this package as a library

1. Depend on it

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


dependencies:
  flutter_html_textview: ^0.2.6

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter packages get

Alternatively, your editor might support flutter 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_textview/flutter_html_textview.dart';
  
Version Uploaded Documentation Archive
0.2.6 Apr 16, 2018 Go to the documentation of flutter_html_textview 0.2.6 Download flutter_html_textview 0.2.6 archive
0.2.5 Apr 15, 2018 Go to the documentation of flutter_html_textview 0.2.5 Download flutter_html_textview 0.2.5 archive
0.2.4 Apr 15, 2018 Go to the documentation of flutter_html_textview 0.2.4 Download flutter_html_textview 0.2.4 archive
0.2.3 Apr 15, 2018 Go to the documentation of flutter_html_textview 0.2.3 Download flutter_html_textview 0.2.3 archive
0.2.2 Apr 15, 2018 Go to the documentation of flutter_html_textview 0.2.2 Download flutter_html_textview 0.2.2 archive
0.2.1 Apr 15, 2018 Go to the documentation of flutter_html_textview 0.2.1 Download flutter_html_textview 0.2.1 archive
0.2.0 Apr 15, 2018 Go to the documentation of flutter_html_textview 0.2.0 Download flutter_html_textview 0.2.0 archive
0.1.4 Apr 15, 2018 Go to the documentation of flutter_html_textview 0.1.4 Download flutter_html_textview 0.1.4 archive
0.1.3 Apr 15, 2018 Go to the documentation of flutter_html_textview 0.1.3 Download flutter_html_textview 0.1.3 archive
0.1.2 Apr 15, 2018 Go to the documentation of flutter_html_textview 0.1.2 Download flutter_html_textview 0.1.2 archive

All 12 versions...

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

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

  • Dart: 2.0.0
  • pana: 0.12.4
  • Flutter: 0.9.5

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health suggestions

Format lib/flutter_html_text.dart.

Run flutter format to format lib/flutter_html_text.dart.

Format lib/flutter_html_textview.dart.

Run flutter format to format lib/flutter_html_textview.dart.

Format lib/html_parser.dart.

Run flutter format to format lib/html_parser.dart.

Maintenance suggestions

The description is too short. (-20 points)

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

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.2
flutter 0.0.0
html ^0.13.3 0.13.3+3
Transitive dependencies
args 1.5.0
async 2.0.8
charcode 1.1.2
collection 1.14.11
convert 2.0.2
crypto 2.0.6
csslib 0.14.6
flutter_cache_manager 0.1.2
http 0.11.3+17 0.12.0
http_parser 3.1.3
logging 0.11.3+2
meta 1.1.6
path 1.6.2
path_provider 0.4.1
shared_preferences 0.4.3
sky_engine 0.0.99
source_span 1.4.1
string_scanner 1.0.4
synchronized 1.5.3
typed_data 1.1.6
utf 0.9.0+5
uuid 1.0.3
vector_math 2.0.8