flutter_html_view 0.5.12 copy "flutter_html_view: ^0.5.12" to clipboard
flutter_html_view: ^0.5.12 copied to clipboard

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

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
  • 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: ^0.5.11
copied to clipboard

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
)
copied to clipboard

MarkdownStyleSheet #

styleSheet: MarkdownStyleSheet(

),
copied to clipboard

styleOptions #

The default and available style options:

Name Default Options
headingStyle "setext" "setext", "atx"
hr "* * *" "* * *", "- - -", "_ _ _"
bulletListMarker "*" "*", "-", "_"
codeBlockStyle "indented" "indented", "fenced"
fence "```" "```", "~~~"
emDelimiter "_" "_", "*"
strongDelimiter "**" "**", "__"
linkStyle "inlined" "inlined", "referenced"
linkReferenceStyle "full" "full", "collapsed", "shortcut"

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>
copied to clipboard

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 `

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

Thanks to #

@Katran

26
likes
40
points
75
downloads

Publisher

verified publisherkarthikponnam.dev

Weekly Downloads

2024.10.02 - 2025.04.16

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

Repository (GitHub)
View/report issues

License

Apache-2.0 (license)

Dependencies

cached_network_image, flutter, flutter_custom_tabs, flutter_markdown, html, html2md, video_player

More

Packages that depend on flutter_html_view