adjusted_html_view_web 0.1.0 copy "adjusted_html_view_web: ^0.1.0" to clipboard
adjusted_html_view_web: ^0.1.0 copied to clipboard

Platformweb

This package provides to the HtmlView with adjusted height and natural displaying on the Web.

adjusted_html_view_web #

pub package

THIS PACKAGE WORKS ONLY ON THE WEB.

Features #

This package provides a more natural HTML display with Flutter on the Web. Because it is displayed in a Platform View instead of an iframe, you get the following benefits:

  • Display according to the height of HTML display
    • ex) possible to mix HTML in Column
  • Text selection
  • Natural scrolling
  • Custom CSS

Try it on: https://organic-nailer.github.io/adjusted_html_view_web/#/

This package is for #

  • Developers that are using Flutter on the Web
  • want to use HTML for parts that cannot be expressed by widgets
  • want to display Rich Text passed by CMS etc

This package is NOT for #

  • Developers that are using Flutter on Mobile or Desktop
  • want to display specific sites
  • want to display contents with WebView

Usage #

Use AdjustedHtmlView with passing richText string to htmlText. You can select the security level by HtmlValidator.

const sampleRichText = """
<h1 id="hf19cd910e2">Heading 1</h1>
<p>Flutter is an open-source UI software development kit created by Google.</p>
""";

AdjustedHtmlView(
    htmlText: sampleRichText,
    htmlValidator: HtmlValidator.loose(),
)

Additional information #

Impossible now #

  • Placing multiple AdjustedHtmlView on one screen
2
likes
150
points
38
downloads

Publisher

verified publisherfastriver.dev

Weekly Downloads

This package provides to the HtmlView with adjusted height and natural displaying on the Web.

Repository (GitHub)

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter, flutter_web_plugins, plugin_platform_interface, uuid

More

Packages that depend on adjusted_html_view_web