flutter_html_bootstrap_css_utilities_extension 0.1.1
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-autonow resolves topointer-events: auto.SpacingGapHandlerruns first and its regex describes only the shape of a spacing class, so it parsedpe-autoas padding-inline-end with sizeauto.autoand the negative spacers are margin-only in Bootstrap, so the handler consumed the class and wrote nothing, andInteractionsHandlernever saw it. The handler now declines margin-only tokens onp*classes, which also meanspt-autoandpt-n3are no longer matched at all -- they are not Bootstrap classes.text-truncateis implemented:overflow: hidden,text-overflow: ellipsis,white-space: nowrap. It previously fell throughTextHandler's text-colour branch, which ends inreturn truefor any unrecognisedtext-*token, and was swallowed.- Neither changes what reaches the screen today:
pointer-events,overflow,text-overflowandwhite-spaceare all outside the 51 propertiesflutter_htmlparses, so both classes stay inunsupportedClassesand 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.mdsaid 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_extensionis a hosted^0.1.0instead 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_htmlextension that inlines Bootstrap 5.3 utility classes (spacing, colors, borders, display, sizing, typography, and more) as CSS understood byflutter_html. - Declarations
flutter_htmlcannot render are suppressed rather than merged intostyle="". Most were inert, butdisplaywas actively harmful:flutter_html's value parser falls back toDisplay.inlinefor anything outsideblock/inline/inline-block/list-item/none, sod-flexturned block<div>s inline.displayis 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 toFlutterError.onError(Sentry, for example) without interrupting rendering. Gated byreportUnsupportedClasses, defaulttrue. - A registered companion extension widens the renderable property set. Today
CssBorderRadiusHtmlExtensionre-enables therounded-*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, onBootstrapUtilitiesResolver,suppressUnrenderableDeclarations,extraSupportedPropertiesandresolveRaw().