widgets_box 0.2.0
widgets_box: ^0.2.0 copied to clipboard
A Flutter package for efficient UI state management, handling loading, empty views, content display, caching, and pull-to-refresh with customizable widgets.
0.2.0 #
- feat: cross-app helper/widget library mined from the consuming apps — additive,
WB-prefixed/namespaced to avoid collisions:- Extensions:
BuildContext(isArabic/isEnglish,isTablet,width/height/topPadding/bottomPadding/keyboardInset);Widget(toSliver,centered,flexible/expanded,withPadding,visible);ThemeMode↔String. - Helper facades:
WBValidators(over the localized validators),WBSheets.show,WBDialogs.confirm/alert(platform-aware),WBDates(isSameDay/isToday/dayLabel/…). - Form inputs:
WBFieldLabel,WBDropdownField,WBDateField,WBPinField(dependency-free OTP). - Display widgets:
WBIconBox,WBArrow(RTL-flipping),WBDividerText(+.or),WBRatingBar,WBAmountText,WBPageDots,WBTextLink,WBSocialButton. - Layout/lists:
WBGap(named spacer),WBHorizontalList,WBSliverList.
- Extensions:
- fix:
WBButton.iconnow inserts a default 8px gap between icon and label (was zero). - fix:
WBPoweredByrenders the bundled GAIT monogram, matches the app footer exactly, and never overflows (FittedBox). - docs: visual brand identity — pub.dev cover, component gallery and styling-precedence images; rewritten README with
WB-name usage examples and pub.devscreenshots. - BREAKING (with migration): public widgets renamed to a consistent
WBprefix —MainButton→WBButton,MainTextField→WBTextField,SmartScreen→WBScreen,SmartEmptyWidget→WBEmptyState,SmartLoadingWidget→WBLoading,SmartCachedImages→WBCachedImage,SmartUserImage→WBUserImage,SmartWelcomeWidget→WBWelcome,SmartRefreshIndicator→WBRefreshIndicator,SmartStatusWidget→WBPositionedStatus,StatusWidget→WBStatus,SmartTagWidget→WBTag,MainButtonEnum→WBButtonType.@Deprecatedtypedef aliases keep old names compiling. - BREAKING: removed the
export 'package:lottie/lottie.dart're-export — it leaked third-party +dart:uinames (e.g.TextDirection) into consumers and forcedhideclauses. Import Lottie directly if needed. - fix: privatized/namespaced leaked generic top-level symbols (
getWidget, the legacy debouncertimer, the toastcurrentContext) to avoid consumer collisions. - feat: parity with app-local wrappers —
WBCachedImage(nullable url + fallback,blendMode, mem-cache, fade-out,useOldImageOnUrlChange);WBCard(width/height/alignment);WBStatus/WBStatusBadge(fill+border, leading dot,onTap, asymmetric radius);WBSectionHeader(leading, required asterisk, inline badge, action color);WBDetailRow(onTap, phone-LTR,valueIcon, flex ratios);WBListRow(selected, bordered surface);WBTextField(title-row action slot,semanticsIdentifier);WBButton(gradient background,semanticsIdentifier). - refactor: button color resolvers are now typed (
Colorreturns) and DRY (shared resolver, loading delegates to text color). - test: first test suite for the package — 88 tests; ~86% line coverage excluding the legacy toast engine.
- feat: new promoted components — WBCard (+
.media), WBListRow (.menu/.toggle/.picker), WBStatusBadge (hex/semantic color resolver), WBSectionHeader, WBDetailRow (+.money) — mined from patterns every consuming app re-implements. - feat:
WBCardConfigtoken config; extendedStatusWidgetwithicon+outlined. - feat: improved existing widgets in place —
SmartCachedImages(SVG + asset + local-file + fade, no darken-on-transparent),SmartEmptyWidget(retry action +.toSliver(), fixed subtitle/SVG detection). - feat: WBToast — theme/
ColorScheme-aware toast readingToastConfig(fixes fixed-350 overflow + maxLines), no name collision with app toast helpers. - feat:
MainButtoncolors now derive fromColorScheme(primary/onPrimary/secondary) instead of hardcodedprimaryColor/Colors.white. - feat:
WB-prefixed aliases for existing widgets (WBButton,WBTextField,WBScreen,WBStatus,WBTag,WBEmpty,WBLoading,WBImage, …) for IDE discoverability; original names unchanged. - chore: replaced 8 self-referential barrel imports with specific relative imports; README rewrite (name, component families, styling precedence).
- feat: generic debug environment switcher (
WBEnvironmentManager,WBEnvironmentConfig,WBAppEnvironment,WBEnvironmentSwitcher) — config-driven, debug-only, release-safe. - feat:
WBAppRestarter— dependency-free in-process app remount (replacesflutter_phoenix). - feat:
WBPoweredByandWBAppVersion(app version/build + Shorebird patch) reusable widgets. - fix: config system — value equality +
hashCodeonWidgetsBoxConfig/ButtonConfig/TextFieldConfig(correctupdateShouldNotify); singleWidgetsBoxConfig.defaultssource of truth; previously-deadButtonConfig/TextFieldConfigfields are now consumed. - feat: text field — expose more
TextFormFieldcapability on the base field (onFieldSubmitted,autofocus,cursorColor,enableInteractiveSelection, overridableonTapOutside);.numbernow uses a decimal keyboard + decimal-tolerant formatter. - fix: text field — opt-in
filled/fillColor/border/radius/label color (defers toInputDecorationThemewhen unset); email min-length false-reject and password special-char regex corrected. - fix: button — background used the border color for non-primary variants; disabled label + border width now configurable.
- fix:
HexColorno longer throws on malformed input (supports#RGB); per-instanceDebouncer;SmartRefreshIndicatorspinner color;SmartWelcomeWidget"null" name;toCapitalLetteron empty string. - chore: export-barrel cleanup (removed dead
app_font, fixedstring_extensionfilename), addedToastConfig.
0.1.0 #
- feat: add string extensions for date formatting and phone number pars…
0.0.9 #
This PR introduces significant refactoring to the text field widgets for improved consistency, enhances the icon button with new positioning options, and updates the project documentation.
0.0.8 #
- Refactor
MainTextFieldand its subclasses for parameter normalization. - Add
minLines,maxLines,maxLength,textDirection,hintTextDirectionto all text fields. - Add
isIconEndtoMainButton.iconto support placing icon after (end of) the label. - Fix image ordering in
MainButton.iconto respect text direction.
0.0.7 #
- add skeleton widget
- add empty widget
0.0.6 #
- fix images
0.0.5 #
- add icon customization options to text fields
0.0.4 #
- update pubspec for version 0.0.4
0.0.3 #
- update pubspec for version 0.0.3
0.0.2 #
- add show toast function
0.0.1 #
- initial release
