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 2026Releases
latest 9-
0.5.330 Jun 2026Release notes
Open source →Added — Widgets
LoadingOverlayWidgetx(widgets/loading_overlay_widgetx.dart)- Blocking overlay that sits on top of any child widget via a
Stack. - When
isLoadingistrue, the child absorbs no pointer events (AbsorbPointer) and the overlay fades in (AnimatedOpacity). Whenfalse, the overlay fades out and the child becomes interactive again. mode: LoadingOverlayMode.fullScreen(default) — translucentbarrierColorlayer 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 toCircularProgressIndicator.barrierColor— configurable barrier colour; defaults toColors.black54.animationDuration— configurable fade duration; defaults to200ms.LoadingOverlayModeenum added toutils/enums.dart.
Documentation
- Updated
README.mdto documentLoadingOverlayWidgetxandLoadingOverlayMode. - Rewrote
CLAUDE.mdto 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.
- Blocking overlay that sits on top of any child widget via a
-
0.5.205 Jun 2026Release notes
Open source →Added — Utils
FormX<K>— Generic form controller (utils/formx.dart)- Manages
TextEditingControllerinstances 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..values—Map<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 inState.dispose().
- Manages
-
0.5.112 May 2026Release notes
Open source →Fixed
- Added
VxStringTextExtensions on Stringso that'hello'.text.make()now works directly on string literals. Previously.textwas only available onTextwidgets.
- Added
-
0.5.012 May 2026Release notes
Open source →Added — Extensions
WidgetX on Widget(new members).padding(EdgeInsets)/.paddingAll(double)/.paddingSymmetric(h, v)/.paddingOnly(...)— padding wrappers..opacity(double)—Opacitywrapper; value clamped to 0.0–1.0..rotate(double)—Transform.rotatewrapper (angle in radians)..scale(double)—Transform.scalewrapper..translate({dx, dy})—Transform.translatewrapper..flexible({flex, fit})—Flexiblewrapper..card({elevation, color, shadowColor, borderRadius, margin})—Cardwrapper..tooltip(String)—Tooltipwrapper..hero(Object tag)—Herowrapper..safeArea({top, bottom, left, right})—SafeAreawrapper..sliverBox—SliverToBoxAdaptergetter.
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— nearestNavigatorState..push(page)/.pop()/.pushNamed(route)/.pushReplacement(page)/.pushAndRemoveAll(page)— navigation helpers..showSnackBar(SnackBar)—ScaffoldMessengershortcut..showModalSheet({builder, ...})— modal bottom sheet shortcut.
DateTimeExt on DateTime(new members).isWeekend/.isWeekday— day-of-week checks..startOfWeek/.endOfWeek— week boundaryDateTimes..startOfMonth/.endOfMonth— month boundaryDateTimes..startOfYear/.endOfYear— year boundaryDateTimes..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 relativeDateTimes..daysFromNow/.hoursFromNow/.minutesFromNow/.secondsFromNow— future relativeDateTimes.
NumX on num(new members).isBetween(min, max)— inclusive range check..roundTo(int decimals)— rounds to N decimal places and returnsdouble.
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 singleList.
ScrollxExtensions on ScrollController(new members).jumpToBottom()/.jumpToTop()— instant non-animated scroll..isAtTop/.isAtBottom— exact edge checks..isNearTop({threshold})— counterpart toisNearBottom..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 format00000-0000000-0.ntn— Pakistani NTN format0000000-0.ipv4— IPv4 address.creditCard— Visa / Mastercard / Amex / Discover / JCB.hexColor—#fffor#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'..fromNow—DateTimethis duration from now..ago—DateTimethis duration before now..delay(VoidCallback)—Future.delayedshortcut..isZero— true wheninMicroseconds == 0.* doubleoperator — scaledDuration.
Added — New Widgets
Widget Description SkeletonLoaderWidgetxShimmer loading placeholder with customizable size, radius, and colors EmptyStateWidgetxIcon + title + subtitle + optional action button, auto-centered AvatarWidgetxCircular avatar with network image, initials fallback, badge count, online indicator PinInputWidgetxPIN / OTP input as a row of individual boxes with auto-focus and backspace navigation ExpandableWidgetxAnimated expand / collapse container with chevron icon GradientButtonWidgetxInk-ripple button with a LinearGradientfillSearchBarWidgetxStyled search field with clear button and configurable debounce StepperIndicatorWidgetxHorizontal step indicator with completed / active / inactive states and optional labels RatingWidgetxStar rating input and display with optional half-star support CountdownTimerWidgetxAuto-ticking countdown with start(),pause(),reset()control andonFinishedcallback
-
0.4.005 May 2026Release notes
Open source →Added
ListxWidgetExtensions on List<Widget>— convert a list of widgets directly into layout widgets:.toRow(...)— wraps children in aRowwith fullRowparameter support..toColumn(...)— wraps children in aColumnwith fullColumnparameter support..toStack(...)— wraps children in aStackwith alignment, fit, and clip options..toList(...)— wraps children in aListView(children mode) with allListViewparameters..toListView(itemBuilder:, ...)— wraps children in aListView.builderwith 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})— returnstruewhen withinthresholdpixels of the bottom..canScroll—trueif the controller has clients and the content is actually scrollable.
-
0.3.024 Apr 2026Release notes
Open source →Added
VxTextBuilder— a fluent, chainable text-styling builder backed byAutoSizeText:- 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–.xl6up 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)— rendersSizedBox.shrink()when false. - Auto-size controls —
.minFontSize(),.maxFontSize(),.stepGranularity(),.overflowReplacement(),.wrapWords(). - Intrinsic mode —
.isIntrinsicdisablesAutoSizeTextfor widgets incompatible withLayoutBuilder(e.g.IntrinsicWidth). .make({Key? key})— produces the finalWidget.
- Font weights —
VxTextExtensions on Text—.textgetter converts an existingTextinto aVxTextBuilderfor further styling.NoneWidget— internalSizedBox.shrink()sentinel; used byVxTextBuilder.when(false).VxWidgetBuilders/VxWidgetContextBuilder/VxTextSpanBuilder— internal abstract builder base classes.VxColorMixin/VxRenderMixin— internal mixins consumed byVxTextBuilder.Vxmixin — internal Tailwind-scale color constants, pixel-value constants, andEdgeInsetspresets used by the builder system.StringExtension.capitalizeAllWords()— capitalizes the first letter of every word in a string; used internally byVxTextBuilder.capitalize.- Added
flutter_auto_size_text: ^5.0.0dependency.
-
0.2.022 Apr 2026Release notes
Open source →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: [...])andSwiperWidgetx.builder(itemCount:, itemBuilder:). - Programmatic control via
nextPage,previousPage,jumpToPage, andanimateToPage. - Configurable
viewportFraction,aspectRatio,height,scrollDirection, fast-scrolling toggle, andonPageChangedcallback.
-
0.1.022 Apr 2026Release notes
Open source →Added
DialogX on BuildContext— two new context-level dialog methods:showConfirmDialog(...)— confirmation dialog with confirm/cancel actions, returnsFuture<bool?>(true= confirmed,false= cancelled,null= dismissed).showInfoDialog(...)— information dialog with a single close action, returnsFuture<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:defaultDialogConfirmColorGlobaldefaultDialogCancelColorGlobaldefaultDialogInfoColorGlobaldefaultDialogBorderRadiusGlobal
-
0.0.122 Apr 2026Release notes
Open source →Added
StringExtension on String?— null-safe string helpers: validation, formatting, masking, conversion, clipboard, Firebase search param, Pakistan mobile formatting, toast.NumX/NumPaddingX on num—SizedBoxandEdgeInsetsshortcuts, ordinal, percentage, async delay.NumDurationX/NumTimeX/NumCoerceInExtension on int— readableDurationconstruction, relativeDateTimehelpers, clamping.ListX on Iterable<T>?— null-safe iteration,groupBy,sumBy,averageBy,firstWhereOrNull.ListSplit/ListSwapExtension on List<T>—splitAt,chunked,partition,swap.ContextX on BuildContext—theme,colorScheme,screenSize, device-class helpers, keyboard utilities.DateTimeExt on DateTime—timeAgo,isToday,isFuture,startOfDay,endOfDay,isSameDay; top-levelcurrentMillisecondsTimeStamp,leapYear,daysInMonth.WidgetX on Widget—center,expanded,withWidth,withHeight,withSize,visible,cornerRadiusWithClipRRect,onTap.BoolxExtensions on bool—isTrue,isFalse,toggle.Patterns— static regex strings for email, URL, phone, file types, Pakistan mobile.MaskTypeenum —auto,email,phone.- Global toast config:
defaultToastBackgroundColor,defaultToastTextColor,defaultToastGravityGlobal,defaultToastBorderRadiusGlobal. - Widgets:
HorizontalListWithoutHeight,ReadMoreWidgetx,RestartAppWidgetx.