Snappy Toast

A lightweight, snappy toast and snackbar manager for Flutter.
โœจ Show beautiful toast messages or stylish snackbars โ€” without needing BuildContext, Navigator, or Stack setup.


๐Ÿ’ก Why Snappy Toast?

Avoid boilerplate code. Works outside widget tree or GetX/Navigator stacks. Clean overlay-based toast & snackbar manager.

๐Ÿš€ Features

  • โœ… Show toast anywhere โ€” without context!
  • ๐Ÿช„ Snackbar support too โ€” separate from toast
  • ๐Ÿ”” Queue system with prioritization
  • ๐ŸŽจ Multiple toast styles (minimal or detailed)
  • ๐Ÿ“ฑ Configurable position (top, center, bottom)
  • ๐Ÿงฉ Custom icons, durations, and dismiss types
  • ๐Ÿ’ฅ Optional haptic feedback
  • ๐Ÿšซ Auto-dismiss and swipe-to-dismiss support

๐Ÿ›  Installation

Add the dependency to your pubspec.yaml:

dependencies:
  snappy_toast:
    path: ../snappy_toast # local testing, update when published

๐Ÿงช Example Usage

1๏ธโƒฃ Initialize

Wrap your app with SnappyToastInitializer:

    void main() {
      runApp(SnappyToastInitializer(child: MyApp()));
      }

โœ… You don't need a navigatorKey or extra Stack.

2๏ธโƒฃ Show a Toast

    SnappyToast.show(
      message: "Hello from toast!",
      type: ToastType.success,
      position: ToastPosition.bottom,
      );

3๏ธโƒฃ Show a Snackbar

    SnappyToast.showSnackBar(
        message: "This is a snackbar",
        type: ToastType.warning,
        duration: Duration(seconds: 3),
        );

๐ŸŽ› Configurations

Parameter Description Default
type success, error, warning, info info
position top, center, bottom (toast only) bottom
style minimal, detailed detailed
dismissType swipe or onTap swipe
duration Show time 2 seconds
customIcon Override the icon null
priority Priority in the toast queue 0
haptic Enable haptic feedback false
dismissAll Remove all previous toasts/snackbars false

โœจ Author

Made with โค๏ธ by Samuel & Atul

Libraries

snappy_toast