main_widgets library

Classes

AssetLottie
ButtonModel
CustomSizeTransition
Animates its own size and clips and aligns its child.
DropShadow
FileLottie
FrameRate
HexColor
Lottie
A widget to display a loaded LottieComposition. The controller property allows to specify a custom AnimationController that will drive the animation. If controller is null, the animation will play automatically and the behavior could be adjusted with the properties animate, repeat and reverse.
LottieBuilder
A widget that displays a Lottie animation.
LottieCache
LottieComposition
LottieDelegates
LottieDrawable
LottieFontStyle
LottieImageAsset
LottieOptions
LottieProvider
Marker
MemoryLottie
NetworkLottie
RawLottie
A widget that displays a LottieDrawable directly.
RenderCache
SmartCachedImages
A widget that displays a cached network image with optional placeholders, error handling, and image filtering.
SmartEmptyWidget
SmartLoadingWidget
SmartRefreshIndicator
SmartScreen
SmartStatusWidget
SmartTagWidget
StatusWidget
StyledToast
Toast configuration widget, which we use to save the overall configuration for toast widget in.
StyledToastPosition
Toast position.
StyledToastTheme
Toast theme, only for default content widget.
StyledToastWidgetState
ToastFuture
The class for managing the overlay and dismiss.
ToastManager
Toast manager, manage toast list.
ValueDelegate<T>

Enums

EmptyType
Enum that defines the type of empty state to display.
LoadingType
Enum that defines the type of loading indicator to display.
StyledToastAnimation
Toast animation.
StyledToastShowType
Toast showing type.
ToastStatus

Constants

animationDuration → const Duration
Default animation duration.

Properties

currentContext BuildContext?
Current context of the page which uses the toast.
getter/setter pair
timer Timer?
getter/setter pair

Functions

dismissAllToast({bool showAnim = false}) → void
The method to dismiss all toast.
getAnimation<T>(T start, T end, AnimationController controller, {Curve curve = Curves.linearToEaseOut}) Animation<T>
Get the animation simply.
getWidget({required BuildContext context, required bool isLoading, required bool isEmpty, required Widget child, Widget? emptyWidget, String? message, required Future<void> onRefresh()?}) Widget
A function that returns a widget based on the state of loading, empty content, or displaying data.
runDebouncer(VoidCallback action, {int milliseconds = 800}) → void
showToast(String? msg, {BuildContext? context, Duration? duration, Duration? animDuration, StyledToastPosition? position, TextStyle? textStyle, EdgeInsetsGeometry? textPadding, double toastHorizontalMargin = _defaultHorizontalMargin, Color? backgroundColor, BorderRadius? borderRadius, ShapeBorder? shapeBorder, VoidCallback? onDismiss, TextDirection? textDirection, bool? dismissOtherToast, StyledToastAnimation? animation, StyledToastAnimation? reverseAnimation, Alignment? alignment, Axis? axis, Offset? startOffset, Offset? endOffset, Offset? reverseStartOffset, Offset? reverseEndOffset, TextAlign? textAlign, Curve? curve, Curve? reverseCurve, bool? fullWidth, bool? isHideKeyboard, CustomAnimationBuilder? animationBuilder, CustomAnimationBuilder? reverseAnimBuilder, bool? isIgnoring, OnInitStateCallback? onInitState}) ToastFuture
Show normal toast with style and animation.
showToastError({required String msg, Color? backgroundColor, Widget? icon, BuildContext? context}) → void
showToastSmart({required String msg, required ToastStatus status, required Widget icon, Color? backgroundColor, Color? textColor, BuildContext? context, double radius = 12, BorderRadiusGeometry? borderRadius}) → void
showToastSuccess({required String msg, Color? backgroundColor, Widget? icon, BuildContext? context}) → void
showToastWidget({BuildContext? context, Duration? duration, Duration? animDuration, VoidCallback? onDismiss, bool? dismissOtherToast, TextDirection? textDirection, Alignment? alignment, Axis? axis, Offset? startOffset, Offset? endOffset, Offset? reverseStartOffset, Offset? reverseEndOffset, StyledToastPosition? position, StyledToastAnimation? animation, StyledToastAnimation? reverseAnimation, Curve? curve, Curve? reverseCurve, bool? isHideKeyboard, CustomAnimationBuilder? animationBuilder, CustomAnimationBuilder? reverseAnimBuilder, bool? isIgnoring, OnInitStateCallback? onInitState, required Widget builder(BuildContext? context, StyledToastTheme? theme)}) ToastFuture
Show custom content widget for toasting.

Typedefs

CustomAnimationBuilder = Widget Function(BuildContext context, AnimationController controller, Duration duration, Widget child)
Builder method for custom animation.
LottieDecoder = Future<LottieComposition?> Function(List<int> bytes)
A function that knows how to transform a list of bytes to a LottieComposition
LottieImageProviderFactory = ImageProvider<Object>? Function(LottieImageAsset)
OnInitStateCallback = dynamic Function(Duration toastDuration, Duration animDuration)
Callback of the life cycle hook initState of toast widget.