PackageTrack
Sign in Get early access

baaba_extensions

Handy pack of extensions for the Flutter SDK — strings, numbers, lists, widgets, dates, booleans, BuildContext, and beautiful dialogs.

0.5.3

What this package is like to depend on

Last release 1 months ago

30 Jun 2026

Ships on a steady schedule

a new release about every 4 weeks

Nearly every release is documented

notes for 9 of 9 stable releases

Nothing withdrawn

no release was ever pulled

4 months old

9 releases · first in 2026

9 releases in the last 12 months

see the full history below

Release timeline

9 releases · Apr 2026 to Jun 2026
Release Pre-release

Releases

latest 9
  1. 0.5.3 30 Jun 2026
    Release notes

    Added — Widgets

    LoadingOverlayWidgetx (widgets/loading_overlay_widgetx.dart)

    • Blocking overlay that sits on top of any child widget via a Stack.
    • When isLoading is true, the child absorbs no pointer events (AbsorbPointer) and the overlay fades in (AnimatedOpacity). When false, the overlay fades out and the child becomes interactive again.
    • mode: LoadingOverlayMode.fullScreen (default) — translucent barrierColor layer fills the widget area with a centred spinner.
    • mode: LoadingOverlayMode.centered — only the spinner is shown; no background tint.
    • indicator — accepts any widget as a custom loading spinner; defaults to CircularProgressIndicator.
    • barrierColor — configurable barrier colour; defaults to Colors.black54.
    • animationDuration — configurable fade duration; defaults to 200ms.
    • LoadingOverlayMode enum added to utils/enums.dart.

    Documentation

    • Updated README.md to document LoadingOverlayWidgetx and LoadingOverlayMode.
    • Rewrote CLAUDE.md to reflect the complete current folder layout (all extension files, widgets/ subfolder), add widget naming rules, a Known Issues table, and corrections to the global-state and regex rules.

    Open source →
  2. 0.5.2 05 Jun 2026
    Release notes

    Added — Utils

    FormX<K> — Generic form controller (utils/formx.dart)

    • Manages TextEditingController instances for any set of keys — enums, strings, or any Dart type.
    • [] operator — retrieve a controller by key; assert fires in debug mode if key is missing.
    • .valuesMap<K, String> of trimmed text values for every field.
    • .value(key) — trimmed value for a single field.
    • .fill(Map<K, String>) — pre-populate fields from existing data (edit-screen support).
    • .reset() — clear all fields at once.
    • .dispose() — dispose all controllers in one call; use in State.dispose().

    Open source →
  3. 0.5.1 12 May 2026
    Release notes

    Fixed

    • Added VxStringTextExtensions on String so that 'hello'.text.make() now works directly on string literals. Previously .text was only available on Text widgets.

    Open source →
  4. 0.5.0 12 May 2026
    Release notes

    Added — Extensions

    WidgetX on Widget (new members)

    • .padding(EdgeInsets) / .paddingAll(double) / .paddingSymmetric(h, v) / .paddingOnly(...) — padding wrappers.
    • .opacity(double)Opacity wrapper; value clamped to 0.0–1.0.
    • .rotate(double)Transform.rotate wrapper (angle in radians).
    • .scale(double)Transform.scale wrapper.
    • .translate({dx, dy})Transform.translate wrapper.
    • .flexible({flex, fit})Flexible wrapper.
    • .card({elevation, color, shadowColor, borderRadius, margin})Card wrapper.
    • .tooltip(String)Tooltip wrapper.
    • .hero(Object tag)Hero wrapper.
    • .safeArea({top, bottom, left, right})SafeArea wrapper.
    • .sliverBoxSliverToBoxAdapter getter.

    ContextX on BuildContext (new members)

    • .isDark / .isLight — theme brightness checks.
    • .orientation / .isPortrait / .isLandscape — device orientation.
    • .topPadding / .bottomPadding / .viewPadding / .viewInsets — safe-area insets.
    • .pixelRatio / .locale — device and locale info.
    • .navigator — nearest NavigatorState.
    • .push(page) / .pop() / .pushNamed(route) / .pushReplacement(page) / .pushAndRemoveAll(page) — navigation helpers.
    • .showSnackBar(SnackBar)ScaffoldMessenger shortcut.
    • .showModalSheet({builder, ...}) — modal bottom sheet shortcut.

    DateTimeExt on DateTime (new members)

    • .isWeekend / .isWeekday — day-of-week checks.
    • .startOfWeek / .endOfWeek — week boundary DateTimes.
    • .startOfMonth / .endOfMonth — month boundary DateTimes.
    • .startOfYear / .endOfYear — year boundary DateTimes.
    • .isSameMonth(other) / .isSameYear(other) — calendar comparisons.
    • .quarterOf — returns 1–4.
    • .age — full years elapsed from this date to today.
    • .addDays(n) / .subtractDays(n) / .addHours(n) / .subtractHours(n) / .addMinutes(n) / .subtractMinutes(n) — convenience arithmetic.

    NumTimeX on int (new members)

    • .minutesAgo / .secondsAgo — past relative DateTimes.
    • .daysFromNow / .hoursFromNow / .minutesFromNow / .secondsFromNow — future relative DateTimes.

    NumX on num (new members)

    • .isBetween(min, max) — inclusive range check.
    • .roundTo(int decimals) — rounds to N decimal places and returns double.

    NumPaddingX on num (improved)

    • .ordinal — fixed 11th/12th/13th (teen) edge cases.

    ListX on Iterable<T>? (new members)

    • .distinct() — deduplicates preserving order.
    • .sortedBy(keySelector) — returns a sorted copy.
    • .mapIndexed(transform) — maps with index.
    • .countWhere(predicate) — counts matching elements.
    • .maxBy(keySelector) / .minBy(keySelector) — find extremes by property.
    • .none(predicate) — true when no element satisfies the predicate.

    IterableIterableX on Iterable<Iterable<T>> (new extension)

    • .flatten() — flattens nested iterables into a single List.

    ScrollxExtensions on ScrollController (new members)

    • .jumpToBottom() / .jumpToTop() — instant non-animated scroll.
    • .isAtTop / .isAtBottom — exact edge checks.
    • .isNearTop({threshold}) — counterpart to isNearBottom.
    • .scrollPercentage — 0.0–1.0 progress through the scrollable.

    StringExtension on String? (new members)

    • .stripHtml() — removes all HTML tags.
    • .containsAny(List<String>) — true if any needle is present.
    • .containsAll(List<String>) — true if all needles are present.
    • .wrapAt(int lineLength) — soft-wraps at word boundaries.

    Patterns (new constants)

    • cnic — Pakistani CNIC format 00000-0000000-0.
    • ntn — Pakistani NTN format 0000000-0.
    • ipv4 — IPv4 address.
    • creditCard — Visa / Mastercard / Amex / Discover / JCB.
    • hexColor#fff or #ffffff.

    Added — New Extensions

    ColorX on Color

    • .lighten([amount]) / .darken([amount]) — HSL-based lightness adjustment.
    • .toHex({leadingHash, includeAlpha}) — hex string, e.g. '#2196F3'.
    • .isLight / .isDark — luminance-based brightness check.
    • .complementary — color with hue shifted 180°.
    • .mix(Color, {weight}) — blend two colors by weight.
    • .withSaturationLevel(double) / .withLightnessLevel(double) — HSL component overrides.

    MapX on Map<K, V>

    • .getOrDefault(key, defaultValue) — safe key lookup.
    • .mapValues(transform) — transform all values.
    • .filterKeys(predicate) / .filterValues(predicate) — filter by key or value.
    • .toListX(transform) — convert entries to a list.
    • .mergeWith(other, {resolve}) — merge two maps with optional conflict resolver.
    • .inverse — swap keys and values.

    DurationX on Duration

    • .format() — compact human-readable string, e.g. '2h 30m', '45s'.
    • .fromNowDateTime this duration from now.
    • .agoDateTime this duration before now.
    • .delay(VoidCallback)Future.delayed shortcut.
    • .isZero — true when inMicroseconds == 0.
    • * double operator — scaled Duration.

    Added — New Widgets

    Widget Description
    SkeletonLoaderWidgetx Shimmer loading placeholder with customizable size, radius, and colors
    EmptyStateWidgetx Icon + title + subtitle + optional action button, auto-centered
    AvatarWidgetx Circular avatar with network image, initials fallback, badge count, online indicator
    PinInputWidgetx PIN / OTP input as a row of individual boxes with auto-focus and backspace navigation
    ExpandableWidgetx Animated expand / collapse container with chevron icon
    GradientButtonWidgetx Ink-ripple button with a LinearGradient fill
    SearchBarWidgetx Styled search field with clear button and configurable debounce
    StepperIndicatorWidgetx Horizontal step indicator with completed / active / inactive states and optional labels
    RatingWidgetx Star rating input and display with optional half-star support
    CountdownTimerWidgetx Auto-ticking countdown with start(), pause(), reset() control and onFinished callback

    Open source →
  5. 0.4.0 05 May 2026
    Release notes

    Added

    • ListxWidgetExtensions on List<Widget> — convert a list of widgets directly into layout widgets:
      • .toRow(...) — wraps children in a Row with full Row parameter support.
      • .toColumn(...) — wraps children in a Column with full Column parameter support.
      • .toStack(...) — wraps children in a Stack with alignment, fit, and clip options.
      • .toList(...) — wraps children in a ListView (children mode) with all ListView parameters.
      • .toListView(itemBuilder:, ...) — wraps children in a ListView.builder with a custom item builder.
    • ScrollxExtensions on ScrollController — fluent scroll utilities:
      • .animateToPosition(offset) — smooth animated scroll to any offset.
      • .animateToBottom() — animated scroll to the end of the scrollable.
      • .animateToTop() — animated scroll to the beginning of the scrollable.
      • .isNearBottom({threshold}) — returns true when within threshold pixels of the bottom.
      • .canScrolltrue if the controller has clients and the content is actually scrollable.

    Open source →
  6. 0.3.0 24 Apr 2026
    Release notes

    Added

    • VxTextBuilder — a fluent, chainable text-styling builder backed by AutoSizeText:
      • Font weights.hairLine, .thin, .light, .normal, .medium, .semiBold, .bold, .extraBold, .extraBlack.
      • Scale aliases.xs (0.75×), .sm (0.875×), .base (1×), .lg (1.125×), .xl.xl6 up to 4×; or exact size via .size(n).
      • Alignment.center, .start, .end, .justify.
      • Text transforms.uppercase, .lowercase, .capitalize.
      • Overflow.ellipsis, .fade, .visible, or .overflow(TextOverflow.*).
      • Text decoration.underline, .lineThrough, .overline.
      • Letter spacing.tight, .tighter, .tightest, .wide, .wider, .widest, or .letterSpacing(n).
      • Line height.heightTight, .heightSnug, .heightRelaxed, .heightLoose, or .lineHeight(n).
      • Shadow.shadow(offsetX, offsetY, blur, color), .shadowBlur(), .shadowColor(), .shadowOffset().
      • Color — full Tailwind-style palette via shorthand getters (e.g. .blue500, .red300, .emerald700), plus .white, .black, .transparent.
      • TextTheme integration.displayLarge(context), .headlineMedium(context), .bodySmall(context), etc. for all M3 text roles.
      • Conditional rendering.when(bool) — renders SizedBox.shrink() when false.
      • Auto-size controls.minFontSize(), .maxFontSize(), .stepGranularity(), .overflowReplacement(), .wrapWords().
      • Intrinsic mode.isIntrinsic disables AutoSizeText for widgets incompatible with LayoutBuilder (e.g. IntrinsicWidth).
      • .make({Key? key}) — produces the final Widget.
    • VxTextExtensions on Text.text getter converts an existing Text into a VxTextBuilder for further styling.
    • NoneWidget — internal SizedBox.shrink() sentinel; used by VxTextBuilder.when(false).
    • VxWidgetBuilders / VxWidgetContextBuilder / VxTextSpanBuilder — internal abstract builder base classes.
    • VxColorMixin / VxRenderMixin — internal mixins consumed by VxTextBuilder.
    • Vx mixin — internal Tailwind-scale color constants, pixel-value constants, and EdgeInsets presets used by the builder system.
    • StringExtension.capitalizeAllWords() — capitalizes the first letter of every word in a string; used internally by VxTextBuilder.capitalize.
    • Added flutter_auto_size_text: ^5.0.0 dependency.

    Open source →
  7. 0.2.0 22 Apr 2026
    Release notes

    Added

    • SwiperWidgetx — a fully-featured carousel/swiper widget with both list and builder constructors:
      • Supports infinite scroll, auto-play, custom intervals/curves, enlarge-center-page, and bi-directional scroll.
      • Named constructors: SwiperWidgetx(items: [...]) and SwiperWidgetx.builder(itemCount:, itemBuilder:).
      • Programmatic control via nextPage, previousPage, jumpToPage, and animateToPage.
      • Configurable viewportFraction, aspectRatio, height, scrollDirection, fast-scrolling toggle, and onPageChanged callback.

    Open source →
  8. 0.1.0 22 Apr 2026
    Release notes

    Added

    • DialogX on BuildContext — two new context-level dialog methods:
      • showConfirmDialog(...) — confirmation dialog with confirm/cancel actions, returns Future<bool?> (true = confirmed, false = cancelled, null = dismissed).
      • showInfoDialog(...) — information dialog with a single close action, returns Future<void>.
    • Both dialogs support full customization: title, message, icon, confirmColor/accentColor, cancelColor, backgroundColor, borderRadius, titleStyle, messageStyle, barrierDismissible, and optional callbacks.
    • New global dialog config vars in default_configs.dart:
      • defaultDialogConfirmColorGlobal
      • defaultDialogCancelColorGlobal
      • defaultDialogInfoColorGlobal
      • defaultDialogBorderRadiusGlobal

    Open source →
  9. 0.0.1 22 Apr 2026
    Release notes

    Added

    • StringExtension on String? — null-safe string helpers: validation, formatting, masking, conversion, clipboard, Firebase search param, Pakistan mobile formatting, toast.
    • NumX / NumPaddingX on numSizedBox and EdgeInsets shortcuts, ordinal, percentage, async delay.
    • NumDurationX / NumTimeX / NumCoerceInExtension on int — readable Duration construction, relative DateTime helpers, clamping.
    • ListX on Iterable<T>? — null-safe iteration, groupBy, sumBy, averageBy, firstWhereOrNull.
    • ListSplit / ListSwapExtension on List<T>splitAt, chunked, partition, swap.
    • ContextX on BuildContexttheme, colorScheme, screenSize, device-class helpers, keyboard utilities.
    • DateTimeExt on DateTimetimeAgo, isToday, isFuture, startOfDay, endOfDay, isSameDay; top-level currentMillisecondsTimeStamp, leapYear, daysInMonth.
    • WidgetX on Widgetcenter, expanded, withWidth, withHeight, withSize, visible, cornerRadiusWithClipRRect, onTap.
    • BoolxExtensions on boolisTrue, isFalse, toggle.
    • Patterns — static regex strings for email, URL, phone, file types, Pakistan mobile.
    • MaskType enum — auto, email, phone.
    • Global toast config: defaultToastBackgroundColor, defaultToastTextColor, defaultToastGravityGlobal, defaultToastBorderRadiusGlobal.
    • Widgets: HorizontalListWithoutHeight, ReadMoreWidgetx, RestartAppWidgetx.
    Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive