ex library

ex is a helper library that provides readable methods with which you can write cleaner looking code.

Classes

AbstractRandomProvider
A generator of double values.
Arc
AStack
CircularProfileAvatar
CircularProfileAvatar allows developers to implement circular profile avatar with border, overlay, initialsText and many other features which simplifies developer's job. It is an alternative to Flutter's CircleAvatar Widget.
CoreRandomProvider
A generator of random values using a supplied.
DefaultRandomProvider
A generator of pseudo-random double values using the default.
DiscreteCircle
ExAccordion
ExAppBar
ExAvatarView
`url` can be either url or asset `url` support .svg .png .jpg .jpeg .gif
ExBackButton
ExBaseTextField
An easy to use implementation of TextField with ready to use props.
ExButtonElevated
ExButtonLoading
ExButtonOutline
ExButtonText
ExCloseButton
ExDashLine
ExDivider
ExHttp
ExHttp
ExImageView
ExKeyValue
————————————————————————————————————————————————————————————————————————————— general object Key Value. use example:
ExOpacityAnimation
ExProgressBar
ExRefreshIndicator
ExRestartWidget
ExScaleAnimation
ExSwipe
SwipeTo is a wrapper widget to other Widget that we can swipe horizontally to initiate a callback when animation gets end. It is useful to develop and What's App kind of replay animation for a component of ongoing chat.
ExTextAnimation
ExTextField
ExTextFieldMultiline
ExTranslateAnimation
ExUiErrorOrEmpty
ExUiLoading
ExUiShimmerGrid
ExUiShimmerList
FullScreenViewer
HeightBox
SizedBox widget with specific height
HStack
A widget that displays its children in a horizontal array.
KeymotionGestureDetector
LoadingAnimationWidget
MaterialResponsiveUiData
A class that can be queried for breakpoints based on the guidelines in https://material.io/guidelines/layout/responsive-ui.html .
MobileDeviceInfo
Combines MobileDeviceType and MobileDeviceSize.
MyHttpOverrides
————————————————————————————————————————————————————————————————————————————— MyHttpOverrides —————————————————————————————————————————————————————————————————————————————
RenderInnerShadow
SquareBox
SizedBox widget with equal width & height
VelocityXInkWellBuilder
VelocityXTextSpan
VStack
A widget that displays its children in a vertical array.
VxAdaptive
A widget that enables screen adaptation and scaling in Flutter applications.
VxAdaptiveNavigation
VxAdaptiveNavigation is a wigdet which can be used for navigation throughout the app. On Small screen it use NavigationBar and on Large screen it use NavigationRail.
VxAdaptiveScope
VxAnimatedBox
VxAnimatedBox is similar to AnimatedContainer with the advantages of VxBox
VxAnimatedHeightView<T extends Widget>
VxApp
Wrap your app with VxApp to use VxState and VxStore.
VxAppData
VxArc
VxArcClipper
VxBadge
VxBadge widget for using common badges as number or dot.
VxBevel
VxBlock
A widget that displays its children in a one-dimensional array.
VxBox
A convenience widget that combines common painting, positioning, and sizing widgets.
VxBuilder<T>
A stream builder like widget that accepts mutations and rebuilds after their execution.
VxCapsule
VxCard
A material design card: a panel with slightly rounded corners and an elevation shadow.
VxCircle
VxClipShadow
VxClipShadowPainter
VxConditional
Runs a WidgetBuilder's result if the condition is true.
VxConditionalSwitch
Renders widgets based on switch case conditions Example:
VxConsumer<T>
A stream builder like widget that accepts mutations and rebuilds after their execution.
VxContinuousRectangle
VxDarkModeButton
VxDarkModeMutation
VxDash
VelocityX widget to show Dashes with gaps if needed. It can be vertical or horizontal.
VxDevice
VxDevice widget can be used for making responsive apps based on if it's mobile or web. In case, if you want more options based on window size, use VxResponsive. You can specify two widgets depends on the screen size mobile and web. They must not be null.
VxDiagonal
VxDiagonalClipper
A widget that clips its child diagonally. Diagonal clipping starts from the position in the axis ends up clipHeight distance from the opposite position
VxDivider
VxEllipse
VxEnsureVisibleWhenFocused
Helper class that ensures a Widget is visible when it has the focus For example, for a TextFormField when the keyboard is displayed
VxEnsureVisibleWhenFocusedState
We implement the WidgetsBindingObserver to be notified of any change to the window metrics
VxFilter
VxFilter is used to apply different color filters to the child widget.
VxFlip
VxFlipState
VxGestureBuilder
A widget that detects gestures.
VxGlassmorphic
VxHalfClipper
VxHoverToggle
VxHoverToggle widget can help you for Desktop/Web apps to toggle between two widgets on hover.
VxInlineBlock
VxInnerShadow
VxInterceptor
Implementation of this class can be used to act before or after a mutation execution.
VxJson
VxJson can be used to show json in tree view of widgets
VxLayout
VxLayout is a type of LayoutBuilder with some additional power
VxMarquee
VxMarqueeState
VxMutation<T extends VxStore?>
An implementation of this class holds the logic for updating the VxStore.
VxNeumorph
VxNeumorph class to accept list of shadows and a Gradient
VxNone
VxNone is a widget that takes no space and returns nothing
VxNotifier
Helper widget that executes the provided callbacks with context on execution of the mutations. Useful to show SnackBar or navigate to a different route after a mutation.
VxOrderedList
VxPaddingBuilder
A widget that insets its child by the given padding.
VxPasswordPainter
VxPinView
VxPinView to give a widget where OTP or Pin screen can be created easily
VxPinViewState
VxPlatform<A extends Widget, I extends Widget, W extends Widget, D extends Widget>
Sample
VxPopupMenu
VxPopupMenu can help you in creating custom popup menus using overlay entry.
VxPopupMenuController
VxPopupMenuController gives you access to hide the menu or toggle it using showMenu, hideMenu & toggleMenu.
VxPopupMenuState
VxRandomBox
A Container Widget that takes up a given width and height and paints itself with a random color.
VxRandomBoxState
VxRating
VxRating widget to show ratings to the user and the user can change it too. Fully customizable
VxRatingState
VxResponsive
VelocityResponsive widget can be used for making responsive apps based on different window sizes. You can specify multiple widgets depends on the screen size like xsmall, small, medium,large, and xlarge. The fallback must not be null. It will be replaced if you don't specity any above widget.
VxRichText
Creates a AutoSizeText widget with a TextSpan.
VxScrollHorizontal
Widget to directly access SingleChildScrollView horizontally.
VxScrollVertical
Widget to directly access SingleChildScrollView vertically.
VxSelectableTextBuilder
A run of selectable text with a single style.
VxShifter
Use it to pin and shift widget useful for making complex ui Eg Container( height: 200, width: 200, decoration: BoxDecoration(shape: BoxShape.circle, color: Color(0xffE0D8F9) ), ).shift(100, alignment: Alignment.bottomRight) ,
VxShimmer
VxShimmer widget can be used to provide shimmer effect to any widget.
VxShimmerState
VxSizeConfig
VxSkeleton
To show skeleton with any widget.
VxSkeletonState
VxStat
A widget that displays a statistic with an icon.
VxState
The coordinating widget that keeps track of mutations and the notify the same to the listening widgets.
VxStateSwitcher
VxStateSwitcherState
VxStepper
VxStepper widget to have a input enabled counter with 2 buttons, one for addition and one for subtraction with good level of customization.
VxStepperState
VxStore
App's store should extend this class. An instance of this class is given to VxState while initialization only once.
VxSwiper
Use this widget VxSwiper to give your list a swipeable effect with full customization.
VxSwiperState
VxSwitcher
VxSwitcher can be used for Desktop and mobile platforms to change the state using AnimatedSwitcher in case of using mobile.
VxTable
A widget that uses the table layout algorithm for its children.
VxTextBuilder
Flutter widget that automatically resizes text to fit perfectly within its bounds.
VxTextDropDown
A material design button for selecting from a list of items.
VxTextField
An easy to use implementation of TextField with ready to use props.
VxTextFieldState
VxTicket
VxTimeline
To show a timeline view with filled dot, header and description. Great for showing something like a history
VxTimelineModel
VxTimelineState
VxTimerButton
Read button
VxTimerButtonState
VxToggleRotate
VxToggleRotate to rotate and animate any widget
VxTriangle
VxTwo
Can be used for two texts together vertically or horizontally.
VxTwoColumn
Can be used for two widgets together vertically.
VxTwoRow
Can be used for two widgets together horizontally.
VxUniversal
VxUniversal is an universal super widget which can be used to do almost everything.
VxUnorderedList
VxUnorderedList is inspired from html where you can have a circular disk with an item (string) Use VxUnorderedList to have a list of strings with circular disk of boxes with a defined color.
VxZeroCard
VxZeroCard can be used to provide a single loading card with PKSkeleton cool animation.
VxZeroCardState
VxZeroList
VxZeroList can be used to provide a list of loading cards with PKSkeleton cool animation.
VxZoom
VxZoom widget allows a widget to pinch and zoom on top of current context by inserting a OverlayEntry.
VxZoomState
WidthBox
SizedBox widget with specific width
ZStack
A widget that positions its children relative to the edges of its box.

Enums

BSContentType
BSHeaderType
DisposeLevel
ExButtonState
ExButtonType
ExDividerMode
ExDividerTextMode
ExTextFieldBorderType
Method
MobileDeviceSize
Symbolic sizes of mobile devices.
MobileDeviceType
Types of mobile devices.
VxAdaptiveScaleType
Defines the different scaling options for screen adaptation.
VxArcType
VxBadgePosition
VxBadgeType
VxClickType
Provide click type either longClick or singleClick
VxColorFilter
VxColorFilter contains enums for different color filters.
VxCurve
VxCurve to provide different types of curves to the neumorphic design. concave is default.
VxDiagonalPosition
Defines the corners of the child widget
VxDividerType
VxDrawerType
VxEdge
VxFill
VxHoverMode
VxListType
VxPageState
VxPinBorderType
VxPreviewIndicatorAxis
VxSkeletonAnimationType
VxStatus
Status about the current state
VxTextFieldBorderType
VxThemeMode
VxToastPosition
Toast position
VxToastType
VxWindowSize
Symbolic window sizes of mobile devices.

Mixins

ExAlert
ExBottomSheet
ExDatePicker
ExDecorator
ExImagePreview
ExLoading
ExRandom
ExSnackbar
LogColor
Vx
Mixin Vx provides basic operations and utilities
VxBottomSheet
VxDialog
VxDrawer
VxEffects<ON>
Secondary mutation executed based on the result of the first. Similar to chaining actions in Redux. For example, an http request will have a success or a fail side effect after request is complete.
VxPreview
VxToast
VxWeb3

Extensions

CenterExtension on Widget
Center the widget
DateToStringExtension on DateTime
DATE TO STRING
ExtensionListUnsafe on List?
ExtensionUint8List on Uint8List
FilterExtension on Widget
This extension will help to provide different filters to the widget.
IntExtensionHelper on int
IterableBasics2 on Iterable<T>
IterableOfDoubleSC on Iterable<double>
IterableOfIntSC on Iterable<int>
IterableX on Iterable<T>
Extensions for Iterable.
ListX on List<T>
Extensions for List.
MapX on Map<K, V>
Extensions for Map.
MiscExtensions on String?
NullableIterableX on Iterable<T>?
Extensions for nullable Iterable.
NullableListX on List<T>?
Extensions for nullable List.
NullableMapX on Map<K, V>?
Extensions for nullable Map.
NullableSetX on Set<T>?
Extensions for nullable Set.
NullableStringIsNotNullOrEmptyExtension on String?
NullableStringIsNullOrEmptyExtension on String?
NumExtensions on num
NumIterableBasics on Iterable<E>
Utility extension methods for Iterables containing nums.
ReformatDateExtension on String
REFORMAT DATE
ScrollExtension on Widget
Extension method to directly access SingleChildScrollView with any widget without wrapping or with dot operator.
SetX on Set<T>
Extensions for Set.
StringToDateExtension on String
STRING TO DATE
StringWidgetsExtension on String
Unique on List<E>
VelocityXRichTextExtension on RichText
VelocityXTextSpanExtension on TextSpan
VxAnimatedContainerWidgetExtension on Widget
VxBadgeExtension on Widget
VxBoolExtension on bool
VxBreakpointUtils on BoxConstraints
VxCardExtension on Widget
VxCenterBuilderExtension on VxWidgetBuilder<Widget>
VxColorExtension on Color
VxContainerWidgetExtension on Widget
VxContextExtensions on BuildContext
Extensions for general basic Context
VxDateTimeExtension on DateTime
Date Time Extension Methods
VxDropDownExtension on List<String>
VxDurationExtension on Duration
VxDurationString on String
VxExtensionList on List<T>
VxExtensionMap on Map<K, V>
VxFunctionExtension on Function
VxFutureFunctionExtension on Future Function()
VxGestureExtensions on Widget
VxGlassWidgetExtension on Widget
VxGlobalKeyExtension on GlobalKey<State<StatefulWidget>>
VxHumanizedDuration on Duration
VxIcon on Icon
Extension method to directly access Icon.
VxIntExtension on int
Extension method for integers.
VxIterableBasics on Iterable<E>
Utility extension methods for the native Iterable class.
VxListStringExtension on List<String>
VxListWidgetExtension on List<Widget>
Extension Methods for List of widgets.
VxMarqueeExtension on String
VxNullableStringIsEmptyOrNullExtension on String?
VxNullableStringIsNotEmptyAndNotNullExtension on String?
VxNumExtension on num
Extension Methods & Widgets for the numbers
VxObjectExtensions on Widget
Extension Methods for Alignment of the objects.
VxOpacityExtension on Widget
Extension method for providing opacity on the top of widgets
VxPaddingExtensions on Widget
Extension to provide Padding to any widget.
VxRandomContainerWidgetExtension on Widget
Random Color box extension method
VxRoutesWidgetsExtension on Widget
VxScrollControllerExtension on ScrollController
Extensions for ScrollController
VxSelectableTextExtensions on SelectableText
VxShapesExtension on Widget
VxShiftWidgetExt on Widget
VxShimmerExtension on Widget
VxSizedBoxExtension on Widget
A box with a specified size.
VxSkeletonExtension on Widget
VxStringExtension on String
Extension Methods & Widgets for the strings
VxTableExtensions on List<TableRow>
VxTextExtensions on Text
VxThemeExtension on Widget
Extension method to directly access material Theme with any widget without wrapping or with dot operator.
VxToastExtension on BuildContext
VxToggleExtension on Widget
VxTransformExtension on Widget
Extension method to directly transform any widget without wrapping or with dot operator.
VxWeb3Extension on String
VxWidgetsExtension on Widget
VxZoomExtensions on Widget

Constants

asciiEnd → const int
asciiStart → const int
lowerAlphaEnd → const int
lowerAlphaStart → const int
maxSupportedInteger → const int
minSupportedInteger → const int
numericEnd → const int
numericStart → const int
upperAlphaEnd → const int
upperAlphaStart → const int

Functions

asyncGuard<T>(Future<T> callback(), [T? defaultValue]) Future<T?>
Evaluates the function asynchonically wrapping the body with try/catch and returns default value if error was raised or return value is null Originally available at https://pub.dev/packages/guard
getErrorMessage(int? code, {Response? response}) String
getView(dynamic child, Color? textColor) Widget
guard<T>(T callback(), [T? defaultValue]) → T?
Evaluates the function wrapping the body with try/catch and returns default value if error was raised or return value is null Originally available at https://pub.dev/packages/guard
log(dynamic msg, {String? name}) → void
logC(dynamic ansiColor, dynamic msg, {String? name}) → void
logD(dynamic msg, {String? name}) → void
logE(dynamic msg, {String? name}) → void
logI(dynamic msg, {String? name}) → void
logJson(Map<String, dynamic> input, {String? name = 'JSON VIEW'}) → void
json
logS(dynamic msg, {String? name}) → void
logW(dynamic msg, {String? name}) → void
myBoxDec(dynamic animation, {dynamic isCircle = false, dynamic isDark = false}) Decoration
myBoxDesc to reuse with PKSkeleton
print(dynamic msg, {String? name}) → void
withAnimation<T>({required TickerProvider vsync, required Tween<T> tween, required AnimationUpdateCallBack<T?> callBack, Duration duration = const Duration(seconds: 1), double initialValue = 0.0, Curve curve = Curves.linear, Animation? customAnimation}) AnimationController
To perform forward animation in a simpler way
withRepeatAnimation<T>({required TickerProvider vsync, required Tween<T> tween, required AnimationUpdateCallBack<T?> callBack, Duration duration = const Duration(seconds: 1), double initialValue = 0.0, Curve curve = Curves.linear, double? lowerBound, double? upperBound, bool isRepeatReversed = false, Duration? repeatPeriod, Animation? customAnimation}) AnimationController
To perform repeat animation in a simpler way

Typedefs

AnimationUpdateCallBack<T> = dynamic Function(T animationVal, double controllerVal)
ContextCallback = void Function(BuildContext context, VxMutation<VxStore?> mutation, {VxStatus? status})
Function signature for the callback with context.
FnBuilderCallback = void Function()
OnRetry = void Function()
OnStateChanged = Widget Function(VxPageState state)
VxAdaptiveChildBuilder = Widget Function(BuildContext context, bool scaled)
A typedef representing a callback function used to build the UI based on the current screen adaptation settings.
VxAppBuilder = Widget Function(BuildContext context, VxAppData vxData)
VxInternalStore is the internal store for the app.
VxFlipCallback = void Function(VxFlipState vxFlip)
VxFlipOnFlipCallback = void Function(bool isFront)
VxMutationBuilder = VxMutation<VxStore?> Function()
Function signature for mutations that has deferred execution. VxMutation.next accepts functions with this signature.
VxStateWidgetBuilder<T> = Widget Function(BuildContext context, T store, VxStatus? status)
VxWidgetBuilder gives context and status back. Status are more useful when you use vx effects
VxToggleBuilder = Widget Function(Widget child)

Exceptions / Errors

ApiException
ProviderError
ProviderError thrown when a provides a value outside the expected [0, 1) range.