main_widgets
library
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.