flutter_widget_from_html

Flutter package to render html as widgets that supports hyperlink, image, audio, video, iframe and many other tags.

MIT License

Stars
625
Committers
16

Bot releases are hidden (Show)

flutter_widget_from_html -

Published by daohoangson almost 4 years ago

  • Improve RUBY baseline (#362)
  • Fix CssBlock loosing stretched width on render object updated (#360)
  • Fix nested sizing / text-align / vertical-align (#361)

Deployed 399bd3bc97f3c5d5d2815fff53c73e499c550683 to https://api-4u2589v25.vercel.app.

Quick links:

Deployed 399bd3bc97f3c5d5d2815fff53c73e499c550683 to https://example-7z0yy8z3f.vercel.app.

Quick links:

flutter_widget_from_html -

Published by daohoangson about 4 years ago

  • Fix LI marker position on non-default line height

Deployed 83ae6c683f8f429d6e506d07e6058a0ca705cbb4 to https://api-4u2589v25.vercel.app.

Quick links:

Deployed 83ae6c683f8f429d6e506d07e6058a0ca705cbb4 to https://example-c7j90lzxc.vercel.app.

Quick links:

flutter_widget_from_html -

Published by daohoangson about 4 years ago

  • Fix bug null access (authored by @sweatfryash)
  • Fix bug customWidgetBuilder does not work for TABLE, VIDEO (#353)

Deployed d429bb13419d0169b15664261a2af9bac3bd24d7 to https://api-4u2589v25.vercel.app.

Quick links:

Deployed d429bb13419d0169b15664261a2af9bac3bd24d7 to https://example-oakx6prrz.vercel.app.

Quick links:

flutter_widget_from_html -

Published by daohoangson about 4 years ago

  • Discard preferred width / height on infinity value. (#340)
  • Fix image with dimensions cannot scale down (#341)
  • Use a separated BuildOp for display: block (#342)

Deployed efa0b397b0b66889ee5ad1b22267653ef307b3f8 to https://api-4u2589v25.vercel.app.

Quick links:

Deployed efa0b397b0b66889ee5ad1b22267653ef307b3f8 to https://example-4u9svdsgi.vercel.app.

Quick links:

flutter_widget_from_html -

Published by daohoangson about 4 years ago

  • Add support for auto, percentage sizing (e.g. width: 50%)
  • Fix image cannot scale up (#337)

This release includes some changes that may require migration if you have a custom WidgetFactory:

  • Replace BuildMetadata.isBlockElement with .willBuildSubtree.
  • Replace BuildOp.isBlockElement with .onWidgetsIsOptional
  • Split display parsing into WidgetFactory.parseStyleDisplay
  • TextStyleHtml.crossAxisAlignment has been removed (no replacement)

Deployed be2c423e728bb673a33a240c503c77f3f02fd102 to https://api-4u2589v25.vercel.app.

Quick links:

Deployed be2c423e728bb673a33a240c503c77f3f02fd102 to https://example-gwh1xadoa.vercel.app.

Quick links:

flutter_widget_from_html -

Published by daohoangson about 4 years ago

Deployed b983a0b630ee11b0bd6dde0513982660ae049689 to https://api-4u2589v25.vercel.app.

Quick links:

Deployed b983a0b630ee11b0bd6dde0513982660ae049689 to https://example-bi5wotdp7.vercel.app.

Quick links:

flutter_widget_from_html -

Published by daohoangson about 4 years ago

  • Stop using singleton WidgetFactory by default
  • Update video_player version constraint as suggested by publisher (#333, authored by @dgilperez)

Deployed 9334b27c394b1ec3c3af31fd786567ceb99ab466 to https://api-4u2589v25.vercel.app.

Quick links:

Deployed 9334b27c394b1ec3c3af31fd786567ceb99ab466 to https://example-lvm369scl.vercel.app.

Quick links:

flutter_widget_from_html -

Published by daohoangson about 4 years ago

  • Use Stack.clipBehavior instead of .overflow (#321, authored by @bahador)

Note: The packages now require Flutter version 1.20.0 and up.

Deployed 6e97ebdfd7f4fd7fee4743eb46c38617104192e3 to https://api-4u2589v25.vercel.app.

Quick links:

Deployed 6e97ebdfd7f4fd7fee4743eb46c38617104192e3 to https://example-6l7y1367q.vercel.app.

Quick links:

flutter_widget_from_html -

Published by daohoangson about 4 years ago

Note: Only flutter_widget_from_html is updated to 0.5.0+4, flutter_widget_from_html_core stays at 0.5.0+3.

Deployed 6137079f036ad85a5ba723d3ecd2fe2e3c9c8d4f to https://api-4u2589v25.vercel.app.

Quick links:

Deployed 6137079f036ad85a5ba723d3ecd2fe2e3c9c8d4f to https://example-660btp2u6.vercel.app.

Quick links:

flutter_widget_from_html -

Published by daohoangson about 4 years ago

This is a big release with lots of improvements under the hood. If you don't extends WidgetFactory yourself then there are only two changes that may affect your app:

  • customStylesBuilder returns Map instead of List
  • onTapUrl is called for incomplete URL

Other changes:

  • Restore sizing support (#248)
  • Expand support for text-align with end/start/-moz-center/-webkit-center (#305)
  • Update UL bullet for correctness (#306)
  • Add support for colspan / rowspan in table (#157)
  • Add support for inline style text-overflow (#204)
  • Add support em/px in line-height and % in font-size (#220)
  • Add support for svg src in IMG (#233)
  • Add support for inline margin, padding (#237)
  • Add support for pt unit (#266)
  • Add support for inline style background (color only) (#275)
  • Bug fixes

Finally, BREAKING changes if you use a custom WidgetFactory:

  • BuildOp: callback params changed
  • BuiltPiece has been removed
  • NodeMetadata -> BuildMetadata
  • TextBit -> BuildBit
  • TextStyleBuilders -> TextStyleBuilder
  • WidgetFactory
    • All buildXxx methods now have BuildMetadata as first parameter
    • parseTag(NodeMetadata, String, String) -> parse(BuildMetadata)

Deployed ccb7c56788f640680cf11e92711cd90df660265d to https://api-4u2589v25.vercel.app.

Quick links:

Deployed ccb7c56788f640680cf11e92711cd90df660265d to https://example-gcf8qsptk.vercel.app.

Quick links:

flutter_widget_from_html - v0.5.0-rc.2020081901

Published by daohoangson about 4 years ago

This is a big release with lots of improvements under the hood, probably the last pre-release before v0.5.0 stable is out. If you don't extends WidgetFactory yourself then there are only two BREAKING changes that may affect your app:

  • BREAKING: customStylesBuilder returns Map instead of List
  • BREAKING: onTapUrl is called for incomplete URL

Other changes:

  • Add support for pt unit (#266)
  • Add support for inline style background (color only) (#275)
  • Implement inline support for margin, padding (#237)
  • Fix sizing (width, heigh, etc. #248)
  • Fix bug textScaleFactor being considered twice during rendering (#267)
  • Fix widget tree not being updated on dependency changes (#284)

Finally, BREAKING changes if you have a custom WidgetFactory:

  • BuildOp: callback params changed
  • ImgMetadata -> ImageMetadata:
    • Add ImageSource
  • NodeMetadata -> BuildMetadata:
    • Text style properties moved into TextStyleHtml
    • Remove hasOps
    • Remove hasParents
    • ops -> buildOps
    • parents -> parentOps
    • op= -> register(BuildOp)
    • style -> operator [](String)
    • styles= -> operator []=(String, String)
  • TableData -> TableMetadata
  • TextBit
    • Remove TextWhitespace, TextWhitespaceType
    • Remove data
    • Remove canCompile
    • Remove hasTrailingWhitespace (TextBits still has it)
    • InlineSpan compile(TextStyle) -> CompileTo compile(CompileFrom)
    • static TextBit TextBit.nextOf(TextBit) -> instance TextBit next()
  • TextStyleBuilders -> TextStyleBuilder:
    • Builder signature TextStyleHtml Function(BuildContext, TextStyleHtml, T) -> TextStyleHtml Function(TextStyleHtml, T)
  • WidgetFactory
    • buildXxx methods have BuildMetadata as first parameter
    • buildImageXxx -> imageXxx
    • buildGestureTapCallbackForUrl -> gestureTapCallback
    • parseTag(NodeMetadata, String, String) -> parse(BuildMetadata)
  • WidgetPlaceholder
    • Constructor changed
    • Builder signature Iterable<Widget> Function(BuildContext, Iterable<Widget>, T) -> Widget Function(BuildContext, Widget)

Deployed a31439fef74b8edb1a7def87d6724457c4793fbc to https://example-1aak9kx3q.vercel.app.

Quick links:

Deployed a31439fef74b8edb1a7def87d6724457c4793fbc to https://api-ldqgf9mq8.vercel.app.

Quick links:

Deployed a31439fef74b8edb1a7def87d6724457c4793fbc to https://document-pujtpc5qb.vercel.app.

Quick links:

flutter_widget_from_html - v0.4.3

Published by daohoangson about 4 years ago

  • Implement proper inline support for margin and padding (#237)
  • Rollback support for sizing
  • Make NodeMetadata.(op|styles) ignore null
flutter_widget_from_html - v0.5.0-rc.2020071301

Published by daohoangson over 4 years ago

  • BREAKING: Remove 3rd param wf from WidgetPlaceholder.wrap
  • BREAKING: Remove field HtmlWidget.tableCellPadding
  • BREAKING: Remove class CssLineHeight
  • BREAKING: Remove class ImageLayout (#230)
  • BREAKING: Change param builder of TextStyleBuilders.enqueue
  • BREAKING: Change method WidgetFactory.buildImage
  • Add support for colspan / rowspan in table (#157)
  • Add support for inline style text-overflow (#204)
  • Add support for inline style sizing (#206): width, height, max-width, max-height, min-width and min-height
  • Add support em/px in line-height and % in font-size (#220)
  • Add support for svg src in IMG (#233)
  • Bug fixes
flutter_widget_from_html - v0.4.2

Published by daohoangson over 4 years ago

  • Add support for latest Flutter dev channel (#227)
  • Add support for inline style sizing (#206): width, height, max-width, max-height, min-width and min-height
  • Add support for inline style text-overflow (#204)
  • Bug fixes
flutter_widget_from_html - v0.4.1

Published by daohoangson over 4 years ago

Version bump

Package Rankings
Top 1.64% on Pub.dev
Badges
Extracted from project README
Flutter codecov pub package pub package pub package pub package pub package pub package pub package
Related Projects