baaba_extensions 0.4.0 copy "baaba_extensions: ^0.4.0" to clipboard
baaba_extensions: ^0.4.0 copied to clipboard

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

0.4.0 #

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.

0.3.0 #

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.

0.2.0 #

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.

0.1.0 #

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

0.0.1 #

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.
0
likes
0
points
224
downloads

Publisher

unverified uploader

Weekly Downloads

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

License

unknown (license)

Dependencies

flutter, flutter_auto_size_text, fluttertoast

More

Packages that depend on baaba_extensions