ui_framework_kit 1.1.0
ui_framework_kit: ^1.1.0 copied to clipboard
Production-ready Flutter UI kit: adaptive light/dark theming, form widgets, MCQ, shimmer skeletons, HTML/image renderers, and responsive utilities — all in one import.
1.1.0 #
Additive release — six new widgets and two design-token classes. No breaking changes; all existing APIs continue to work as in 1.0.0.
New widgets #
EmptyStateWidget— title, description, optional SVG illustration, optional CTA. Drop-in placeholder for "no data" / "no results" / terminal-error screens.BannerWidgetwithBannerSeverity.{info, warning, error, success}— in-flow status strip with severity-coloured icon and optional dismiss. Different from the content-card-orientedDynamicMessageWidget.AsyncBuilder<T>— typed wrapper aroundFutureBuilder<T>that swaps automatically between shimmer loading, success builder, and a retryable error widget. Replaces hand-writtenFutureBuilderboilerplate.RetryableErrorWidget— standalone error block with icon, message, and retry button. Reusable directly or asAsyncBuilder's default error renderer.ConfirmDialogWidget— theme-aware yes/no/destructive dialog with a staticshow()helper that resolves toFuture<bool?>.OtpInputWidget— N-digit OTP / PIN entry with auto-advance, paste-to-fill, backspace navigation, and digit-only filtering.
New theme tokens #
AppSpacing.{xxs, xs, sm, md, lg, xl, xxl}— 2, 4, 8, 12, 16, 24, 32.AppRadius.{sm, md, lg, xl, full}plus pre-builtAppRadius.{sm, md, lg, xl}RadiusBorderRadiusconstants.
Tooling #
- GitHub Actions CI workflow at
.github/workflows/ci.ymlrunningflutter analyze,flutter test, andflutter pub publish --dry-runon every push and pull request. - Test suite expanded with per-widget coverage for every new widget (~25 additional test cases).
1.0.0 #
First public release on pub.dev under the new name ui_framework_kit.
Package renamed #
- The package is now published as
ui_framework_kit. Update imports:// before import 'package:ui_framework/ui_framework.dart'; // after import 'package:ui_framework_kit/ui_framework_kit.dart';
Breaking changes #
RenderHtmlWidgetrewritten on top offlutter_widget_from_html(the previousflutter_htmlpre-release dep is gone). The parameterhtmlCodeis renamed tohtmlContent; the niche styling parametersstyle,title,padding,alignment,backgroundColor,isLandscape,maxLineshave been replaced by the simplerresponsive,onLinkTap, and ambientDefaultTextStyleinheritance.DatePickerTextFieldno longer depends onnepali_date_pickerorclean_nepali_calendar. It now uses Flutter's built-inshowDatePickerby default. Inject any calendar system (Nepali BS, Persian, Hijri…) via the newcustomPickerBuildercallback.InputButtonWidget:debounceDurationtype changed fromint(seconds) toDuration(defaultDuration(milliseconds: 500)). Update call sites:debounceDuration: 2becomesdebounceDuration: const Duration(seconds: 2).DropdownWidget: the module-leveldropDownNotifierglobal has been removed. UseDropdownWidget.onMenuStateChangeinstead.- Re-exports trimmed:
appinio_social_shareandquiver/asyncare no longer re-exported from the kit. Add them as direct dependencies if you relied on the transitive exports.
New features #
- Accessibility (WCAG 2.2 AA-aligned) — every interactive widget
exposes a
Semanticsnode (button,checkbox,switch,link), enforces a 48dp minimum touch target, honoursMediaQuery.disableAnimationsOf(banner autoplay pauses, shimmer freezes), respectsMediaQuery.textScalerOffor label sizing, and pairs MCQ correct/incorrect colour with a tick/cross icon so state is not conveyed through colour alone. New widget params:semanticLabel,semanticHintonInputButtonWidget,CheckBoxWidget,SwitchWidget,McqAnswerWidget,LinkPreviewWidget. New global config block:UiFrameworkConfig.configure(accessibility: AccessibilityConfig(...))with fields for action-label localisation, min touch target, status-icon toggle, and reduce-motion handling. NewAccessibilityContextextension onBuildContextexposesprefersReducedMotion,prefersBoldText,usesAccessibleNavigation,prefersHighContrast,textScaler, anda11yKit. UiFrameworkConfig.configure({fontFamily, fontStyleBuilder})— configure the font family or provide a fully customTextStylefactory globally.DatePickerTextField.customPickerBuilder— inject any calendar system.DatePickerTextField.dateFormatter— customDateTime-to-Stringformatter.DatePickerTextField: new parametersinitialDate,firstDate,lastDate,hintText,suffixIcon,validator.TimePickerTextField: new parametersinitialTime,timeFormatter,hintText,suffixIcon,validator.InputButtonWidget.isLoading— shows aCircularProgressIndicatorand blocks interaction whiletrue.InputButtonWidgetnow correctly implements tap debounce (was previously a no-op).TextOptionsconstructor is nowconst.TextWidgetfields are allfinal; constructor isconst-capable.RenderHtmlWidget.onLinkTap— handle URL taps; falls back tourl_launcherwhen omitted.DynamicMessageBannerWidgetandScrollPositionListViewWidgetare now exported from the public barrel.- Example app at
example/demonstrates every widget. - pub.dev
screenshots:block scaffolded; drop captures intoscreenshots/to populate the package page.
Bug fixes #
- Critical:
DynamicMessageWidgetno longer shares its visible/hidden state across all instances (was a top-levelValueNotifier). Each banner now manages its own state and disposes it correctly. - The close button on
DynamicMessageWidgetnow dismisses the banner even when noonClosecallback is provided. - Added missing
dispose()calls inCheckBoxWidget,MultipleItemSelector,MultiSelectDropDownWidget,SearchTextFieldWidget, andDynamicMessageBannerWidgetto release controllers andValueNotifiers. - Removed stray
log()debug noise fromYoutubePlayerWidget. - Fixed null assertion crash in
TextFieldWidgetwhenlabelTextColorisnullandenabledistrue. McqWidgetcard background now respects dark/light mode instead of being hardcoded toColors.white.McqWidgetborder colour usesAppColors.borderColor(theme-aware) instead of hardcoded0xFFD7E1F0.DropdownWidgetandTimePickerTextFieldnow properlydispose()theirValueNotifierinstances.- Removed an unexported duplicate
DynamicMessageWidgetthat shadowed the public class name inside the package.
Dependency updates #
- Removed
flutter_html(was pre-release^3.0.0-beta.2); HTML rendering now usesflutter_widget_from_htmlonly. - Removed
appinio_social_shareandquiver(no internal callers). - Removed
nepali_date_pickerandclean_nepali_calendar(git dependency). - Updated
flutter_svgto^2.1.0. - Updated
flutter_inappwebviewto^6.1.5. - Updated
url_launcherto^6.3.1. - Minimum Flutter SDK raised to
>=3.24.0; Dart SDK^3.5.0.
Documentation #
- Every public class in the library now carries a dartdoc summary so pub.dev's documentation score reflects the API surface.
- README rewritten as a copy-paste–first walkthrough of every widget, with a Quick Start, Widget Catalog, Theming, and Common Mistakes.
0.0.1 #
- Initial internal release (under the previous name
ui_framework).