cherry_toast 1.11.0 copy "cherry_toast: ^1.11.0" to clipboard
cherry_toast: ^1.11.0 copied to clipboard

A new way to display toasts in flutter with elegant design and animations

Cherry Toast #

A new way to display toasts in Flutter in an elegant design and animations

info_cherry_toast.gif error_cherry_toast.gif bottom_cherry_toast.gif
warning_cherry_toast.gif success_cherry_toast.gif right_layout_cherry_toast.gif

Cherry Toast #

  • Support all platforms
  • Top and Bottom display position
  • Customizable background color
  • Support RTL layout rendering (for arabic text)
  • Multiple built-in themes
  • Built-in animations
  • Support null safety
  • Elegant design
  • Full customizable
  • Heartbeat animation on icons
  • Customizable icon size and color and display
  • Dismissable notification
  • Customizable toast constraints, height and width

Installation #

To add cherry toast to your project add this line to your pubspec.yaml file

    cherry_toast: ^1.11.0

Parameters #

///Text widget displayed as a title in the toast
  ///required parameter for all toast types
  final Text? title;

  ///Text widget displayed as a description in the toast
  final Text? description;

  ///THe action button displayed below description
  ///by default there's no action added
  final Text? action;

  ///the toast icon, it's required when using the default constructor
  late IconData icon;

  ///the Icon color
  ///this parameter is only available on the default constructor
  ///for the built-in themes the color  will be set automatically
  late Color iconColor;
  //background color of container
  final Color backgroundColor;
  //box shadow color of container
  final Color shadowColor;
  //Custom widget displayed at the place of the predefined icons
  final Widget? iconWidget;

  ///the icon size
  ///by default is 20
  ///this parameter is available in default constructor
  late double iconSize;

  ///the toast display postion, possible values
  final Position toastPosition;

  ///The color that will be applied on the circle behind the icon
  ///for better rendering the action button must have the same color
  late Color themeColor;

  ///the function invoked when clicking on the action button
  final Function? actionHandler;

  ///The duration of the animation by default it's 1.5 seconds
  final Duration animationDuration;

  ///the animation curve by default it's set to `Curves.ease`
  final Cubic animationCurve;

  ///The animation type applied on the toast
  final AnimationType animationType;

  ///indicates whether the toast will be hidden automatically or not
  final bool autoDismiss;

  ///the duration of the toast if [autoDismiss] is true
  ///by default it's 3 seconds
  final Duration toastDuration;

  ///the layout of the toast
  final ToastLayout layout;

  ///Display / Hide the close button icon
  ///by default it's true
  final bool displayCloseButton;

  ///define the border radius applied on the toast
  ///by default it's 20
  final double borderRadius;

  ///Define whether the icon will be  rendered or not
  final bool displayIcon;

  ///Define wether the animation on the icon will be rendered or not
  final bool enableIconAnimation;

  /// The attribute  is declaring a final variable named "width" of type double with a nullable value.
  /// width attribute define the toast width
  final double? width;

  /// The attribute is declaring a final variable named "height" of type double with a nullable type
  /// modifier.
  /// height attribute define the toast height
  final double? height;

  ///Enable taost constraints customization (by default it's null)
  final BoxConstraints? constraints;

  ///indicate whether the toast animation is enabled or not
  ///by default the toast animation is enabled
  final bool disableToastAnimation;

  /// Indicate toast should inherit theme colors sheme, to apply in background
  /// and shadow color.
  final bool inheritThemeColors;

  ///Callback invoked when toast get dismissed (closed by button or dismissed automtically)
  final Function()? onToastClosed;

Usage #

  • Simple cherry toast with only title


title:  Text("The simplest cherry toast", style: TextStyle(color:



  • Simple cherry toast with action button

title:  Text("User added", style: TextStyle(color:,

action: Text("Display information", style: TextStyle(color:,

actionHandler: (){

print("Action button pressed");




A new way to display toasts in Flutter in an elegant design and animations

  • Toast with description without title


description:  Text("All information may be deleted after this action", style: TextStyle(color:,

animationType:  AnimationType.fromLeft,

action:  Text("Backup data", style: TextStyle(color:,

actionHandler: (){

print("Hello World!!");




  • Toast with nothing but description with different animation type and auto dismiss


description:  Text("Invalid account information", style: TextStyle(color:,

animationType:  AnimationType.fromRight,

animationDuration:  Duration(milliseconds:  1000),

autoDismiss:  true



  • Bottom displayed cherry toast


icon:  Icons.alarm_add,


description:  Text("A bottom cherry toast example", style:  TextStyle(color:,

toastPosition:  Position.bottom,

animationDuration:  Duration(milliseconds:  1000),

autoDismiss:  true


  • Right layout rendered cherry toast


icon:  Icons.car_repair,


description: const Text("هذا مثال تصميم من اليمين",  style:  TextStyle(color:,

toastPosition:  Position.bottom,

layout:  ToastLayout.rtl,

animationType:  AnimationType.fromRight,

action: const Text("انقر هنا", style:  TextStyle(color:,

animationDuration: const Duration(milliseconds:  1000),

autoDismiss:  true)



Contribution #

Of course the project is open source, and you can contribute to it repository link

  • If you found a bug, open an issue.

  • If you have a feature request, open an issue.

  • If you want to contribute, submit a pull request.

Contributors #

pub points



A new way to display toasts in flutter with elegant design and animations

Repository (GitHub)
View/report issues


API reference


Consider supporting this project:


MIT (license)




Packages that depend on cherry_toast