htmlencodedtext 0.0.2

  • Readme
  • Changelog
  • Installing
  • 0

htmlencodedtext #

A Flutter plugin that makes it easier to show HTML Encoded Text (from outside APIs perhaps) in your Material Flutter apps.

Dependencies #

This project used html_unescape to help facilitate converting HTML entities:

  • Named Character References ( ) (2099 of them)
  • Decimal Character References (á)
  • Hexadecimal Character References (&#xE3)

For help getting started with Flutter, view our online documentation.

For help on editing package code, view the documentation.

Usage #

class MyApp extends StatelessWidget {
  static final String html =
      '<b>Lorem</b> <i>ipsum</i> <u>dolor</u> <span style="color: #FF0000">sit</span> ' +
          '<span style="text-decoration: underline; font-weight: bold; font-style: italic">amet</span>, ' +
          '<a hef="#">consectetur adipiscing elit</a>, sed do eiusmod tempor incididunt ut ' +
          'labore Foo &#xA9; bar 😀 baz &#x2603; qux et dolore magna aliqua. Ut enim ad &#1F600; minim veniam, quis nostrud exercitation' +
          '<h2>I will display &spades;</h2>' +
          '<p>I will display &#9824;</p>' +
          '<p>I will display &#x2660;</p>';

  final htmlWidg = new HtmlEncodedText(rawHtml: html);
  Widget build(BuildContext context) {
    return Container(

implement our main method

void main() {
    home: MyApp(),
    builder: (context, snapshot) {
      return Scaffold(
        appBar: AppBar(),
        body: MyApp(),

Issues #

Don't hesitate to create pull requests.

Roadmap #

  • Support block status for HTML heading tags
  • Find and handle invalid HTML (ie: "

[0.0.1] - TODO: Add release date.

  • TODO: Describe initial release.

Use this package as a library

1. Depend on it

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

  htmlencodedtext: ^0.0.2

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter pub get

Alternatively, your editor might support pub get or 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:htmlencodedtext/htmlencodedtext.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

The package version is not analyzed, because it does not support Dart 2. Until this is resolved, the package will receive a health and maintenance score of 0.

Analysis issues and suggestions

Support Dart 2 in pubspec.yaml.

The SDK constraint in pubspec.yaml doesn't allow the Dart 2.0.0 release. For information about upgrading it to be Dart 2 compatible, please see


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.23.0 <2.0.0