flutter_html_bootstrap_css_utilities_extension 0.1.1 copy "flutter_html_bootstrap_css_utilities_extension: ^0.1.1" to clipboard
flutter_html_bootstrap_css_utilities_extension: ^0.1.1 copied to clipboard

A flutter_html extension that adds support for Bootstrap CSS utility classes.

0.1.1 #

  • pe-auto now resolves to pointer-events: auto. SpacingGapHandler runs first and its regex describes only the shape of a spacing class, so it parsed pe-auto as padding-inline-end with size auto. auto and the negative spacers are margin-only in Bootstrap, so the handler consumed the class and wrote nothing, and InteractionsHandler never saw it. The handler now declines margin-only tokens on p* classes, which also means pt-auto and pt-n3 are no longer matched at all -- they are not Bootstrap classes.
  • text-truncate is implemented: overflow: hidden, text-overflow: ellipsis, white-space: nowrap. It previously fell through TextHandler's text-colour branch, which ends in return true for any unrecognised text-* token, and was swallowed.
  • Neither changes what reaches the screen today: pointer-events, overflow, text-overflow and white-space are all outside the 51 properties flutter_html parses, so both classes stay in unsupportedClasses and are still named in the per-document report. What changes is that they are named at all instead of disappearing silently, and that a future companion extension can render them.
  • CONTRIBUTING.md said the converter was a git dependency. It has been a published pub.dev dependency since 0.1.0 shipped.
  • The dev-only dependency on flutter_html_css_border_radius_extension is a hosted ^0.1.0 instead of a git ref. It was a git source because the package was not published yet; it is now, and this drops a clone from every CI run.

0.1.0 #

  • Initial release: a flutter_html extension that inlines Bootstrap 5.3 utility classes (spacing, colors, borders, display, sizing, typography, and more) as CSS understood by flutter_html.
  • Declarations flutter_html cannot render are suppressed rather than merged into style="". Most were inert, but display was actively harmful: flutter_html's value parser falls back to Display.inline for anything outside block/inline/inline-block/list-item/none, so d-flex turned block <div>s inline. display is emitted only for values it understands.
  • Unsupported classes are reported once per parsed document via FlutterError.reportError. They are never thrown, so they reach the debug console and crash reporters hooked to FlutterError.onError (Sentry, for example) without interrupting rendering. Gated by reportUnsupportedClasses, default true.
  • A registered companion extension widens the renderable property set. Today CssBorderRadiusHtmlExtension re-enables the rounded-* family. Detection is duck-typed by class name, so no dependency on any companion package.
  • Public API for introspecting coverage: isSupportedClass(), unsupportedClasses, UnsupportedBootstrapClassesException, CssCompanionExtension / kKnownCssCompanions, and, on BootstrapUtilitiesResolver, suppressUnrenderableDeclarations, extraSupportedProperties and resolveRaw().