πŸ”₯ flutter_awesome_snackbar

The most powerful, beautiful, and developer-friendly Flutter notification package.

Pure Flutter β€” zero external dependencies. Everything you need from a modern notification system, plus haptics, scheduling, routing, history, grouping, path animations, and more β€” all built on Flutter's own APIs.


✨ Why flutter_awesome_snackbar?

Feature flutter_awesome_snackbar fluttertoast another_flushbar bot_toast GetX Snackbar
All platforms βœ… ⚠️ Limited βœ… βœ… βœ…
State mgmt. agnostic βœ… βœ… βœ… βœ… ❌
Queue system βœ… ❌ βœ… βœ… βœ…
Priority queue βœ… ❌ ❌ ❌ ❌
Future tracking API βœ… ❌ ❌ ❌ ❌
Glassmorphism βœ… ❌ ❌ ❌ ❌
Built-in animations βœ… 9 styles ❌ ⚠️ 2 styles ⚠️ 3 styles ⚠️ Basic
Custom widget βœ… ❌ βœ… βœ… βœ…
Gradient backgrounds βœ… ❌ ❌ ❌ βœ…
Duplicate prevention βœ… ❌ ❌ βœ… ❌
Dismiss by ID βœ… ❌ ❌ βœ… ❌
Progress bar βœ… ❌ βœ… ❌ βœ…
RTL support βœ… βœ… βœ… βœ… βœ…
Dart 3 / null-safe βœ… βœ… βœ… βœ… βœ…
β˜… Zero dependencies βœ… ❌ ❌ ❌ ❌
β˜… Haptic feedback βœ… ❌ ❌ ❌ ❌
β˜… Scheduling / delay βœ… ❌ ❌ ❌ ❌
β˜… Tap-to-route βœ… ❌ ❌ ❌ ❌
β˜… Notification history βœ… ❌ ❌ ❌ ❌
β˜… Grouped notifications βœ… ❌ ❌ ❌ ❌
β˜… Custom path animation βœ… ❌ ❌ ❌ ❌
β˜… Flip animation βœ… ❌ ❌ ❌ ❌
β˜… Dismiss group βœ… ❌ ❌ ❌ ❌
β˜… Accessibility labels βœ… ❌ ❌ ❌ ❌
β˜… Timestamp display βœ… ❌ ❌ ❌ ❌
β˜… Tap-through support βœ… ❌ ❌ ❌ ❌
β˜… Overlay scrim βœ… ❌ ❌ ❌ ❌
β˜… Cancel scheduled βœ… ❌ ❌ ❌ ❌
β˜… Dismiss callback βœ… ❌ ❌ ❌ ❌
β˜… Asset / network icons βœ… ❌ ❌ ❌ ❌
β˜… SVG / Lottie icon slot βœ… ❌ ❌ ❌ ❌

πŸš€ Quick Start (2 minutes)

1. Install

dependencies:
  flutter_awesome_snackbar: ^1.0.3
flutter pub get

2. Initialize

Wrap your MaterialApp.builder β€” that's it:

import 'package:flutter_awesome_snackbar/flutter_awesome_snackbar.dart';

void main() => runApp(const MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      builder: AwesomeWidget.init(), // ← one line
      home: HomeScreen(),
    );
  }
}

3. Show notifications

AwesomeSnackbar.success("Profile saved!");
AwesomeSnackbar.error("Payment failed.");
AwesomeSnackbar.warning("Weak internet connection.");
AwesomeSnackbar.info("Version 2.0 is available.");

Done. πŸŽ‰


πŸ“¦ Zero External Dependencies

flutter_awesome_snackbar is built entirely on Flutter's own APIs:

  • Haptic feedback β€” Flutter's built-in HapticFeedback (services package)
  • Glassmorphism β€” dart:ui's ImageFilter.blur + BackdropFilter
  • Animations β€” Flutter's AnimationController, SlideTransition, FadeTransition, etc.
  • Overlay system β€” Flutter's native Overlay + OverlayEntry

No vibration, audioplayers, flutter_animate, or any other third-party package is required.


πŸŽ›οΈ All APIs at a Glance

Convenience methods

AwesomeSnackbar.success("Saved");
AwesomeSnackbar.error("Failed", title: "Oops");
AwesomeSnackbar.warning("Low battery");
AwesomeSnackbar.info("New update");

final id = AwesomeSnackbar.loading("Uploading...");
AwesomeSnackbar.dismissById(id);
AwesomeSnackbar.dismissAll();

Full control with AwesomeOptions

AwesomeSnackbar.show(AwesomeOptions(
  title: "No Internet",
  message: "Please check your connection.",
  type: AwesomeType.error,
  position: AwesomePosition.top,
  animation: AwesomeAnimation.elastic,
  duration: Duration(seconds: 5),
  actionText: "Retry",
  onAction: () => reconnect(),
  secondaryActionText: "Dismiss",
  onSecondaryAction: AwesomeSnackbar.dismissAll,
  showProgress: true,
  dismissDirection: AwesomeDismissDirection.horizontal,
  priority: AwesomePriority.critical,
  onDismiss: () => print("dismissed"),
  dismissOnTap: false,
));

Future tracking

await AwesomeSnackbar.future(
  future: uploadData(),
  loading: "Uploading your file...",
  success: "Upload complete! πŸŽ‰",
  error: "Upload failed. Please retry.",
);

Dynamic messages based on result:

await AwesomeSnackbar.future<User>(
  future: fetchUser(),
  loading: "Fetching profile...",
  success: (user) => "Welcome back, ${user.name}!",
  error: (e) => "Error: ${e.toString()}",
);

Extension methods

// On BuildContext
context.flashSuccess("Saved!");
context.flashError("Failed!");

// On String
"Done!".flashSuccess();
"Oops!".flashError();

// On Future
uploadFile().flashFuture(
  loading: "Uploading...",
  success: (_) => "Done!",
  error: (e) => "Failed: $e",
);

β˜… Unique Features

Haptic feedback (built-in, no extra package)

AwesomeSnackbar.show(AwesomeOptions(
  type: AwesomeType.success,
  message: "Saved!",
  haptic: AwesomeHaptic.success,  // uses Flutter's HapticFeedback
));

Available: none, light, medium, heavy, success, warning, error, vibrate

Set globally:

AwesomeSnackbar.configure(AwesomeConfig(
  defaultHaptic: AwesomeHaptic.light,
));

Scheduling & delayed notifications

final sid = AwesomeSnackbar.schedule(
  delay: Duration(seconds: 30),
  options: AwesomeOptions(
    type: AwesomeType.info,
    message: "Reminder: stand up and stretch!",
  ),
);

// Cancel if no longer needed
AwesomeSnackbar.cancelScheduled(sid);

Tap-to-route

AwesomeSnackbar.show(AwesomeOptions(
  type: AwesomeType.info,
  message: "Your order shipped. Tap to track β†’",
  routeName: "/order-tracking",
  dismissOnTap: true,
));

Notification history

// Read all history (newest first)
final records = AwesomeHistory.instance.all;

// Filter
final errors = AwesomeHistory.instance.byType(AwesomeType.error);
final tagged = AwesomeHistory.instance.byTag("checkout");

// Unread count
final unread = AwesomeHistory.instance.unreadCount;

// Mark all read / clear
AwesomeHistory.instance.markAllRead();
AwesomeHistory.instance.clear();

Grouped notifications

AwesomeSnackbar.show(AwesomeOptions(
  type: AwesomeType.info,
  message: "Alice sent you a message",
  groupKey: "chat_alice",
));

// Dismiss the entire group
AwesomeSnackbar.dismissGroup("chat_alice");

Custom path animation

AwesomeSnackbar.show(AwesomeOptions(
  message: "Follows a custom arc!",
  animation: AwesomeAnimation.path,
  pathAnimation: Path()
    ..moveTo(-200, 0)
    ..quadraticBezierTo(0, -150, 0, 0),
));

Flip animation (3D card flip)

AwesomeSnackbar.show(AwesomeOptions(
  type: AwesomeType.info,
  message: "Card flip entrance",
  animation: AwesomeAnimation.flip,
));

πŸ–ΌοΈ Custom Icons

Every notification accepts a custom leading icon. Four input methods are supported β€” pick whichever fits your asset type.

Widget icon (SVG, Lottie, any Flutter widget)

Pass any widget directly. This is the most flexible option and supports third-party renderers like flutter_svg or lottie.

// Material icon with custom colour
AwesomeSnackbar.show(AwesomeOptions(
  type: AwesomeType.custom,
  message: "Starred!",
  iconWidget: const Icon(Icons.star_rounded, color: Colors.amber, size: 22),
));

// SVG asset (requires flutter_svg in your app)
AwesomeSnackbar.show(AwesomeOptions(
  type: AwesomeType.success,
  message: "Upload complete",
  iconWidget: SvgPicture.asset('assets/icons/check.svg', width: 22),
));

// Lottie animation (requires lottie in your app)
AwesomeSnackbar.show(AwesomeOptions(
  type: AwesomeType.success,
  message: "Done!",
  iconWidget: Lottie.asset('assets/lottie/success.json', width: 28),
));

Asset image

AwesomeSnackbar.show(AwesomeOptions(
  type: AwesomeType.info,
  message: "Achievement unlocked",
  iconAsset: 'assets/icons/trophy.png',
));

Network image

AwesomeSnackbar.show(AwesomeOptions(
  type: AwesomeType.info,
  message: "Alice sent you a message",
  iconNetwork: 'https://example.com/avatars/alice.png',
));

ImageProvider

// AssetImage
AwesomeSnackbar.show(AwesomeOptions(
  type: AwesomeType.success,
  message: "Profile updated",
  iconProvider: const AssetImage('assets/icons/check.png'),
));

// NetworkImage
AwesomeSnackbar.show(AwesomeOptions(
  type: AwesomeType.info,
  message: "New badge earned",
  iconProvider: NetworkImage('https://example.com/badges/gold.png'),
));

Priority order: iconWidget β†’ iconAsset β†’ iconNetwork β†’ iconProvider β†’ default type icon. All image sources fall back gracefully to the default type icon if loading fails.

Icon size is controlled via AwesomeThemeData.iconSize:

AwesomeSnackbar.show(AwesomeOptions(
  message: "Big icon",
  iconAsset: 'assets/icons/star.png',
  themeData: AwesomeThemeData(iconSize: 32),
));

🎨 Customization

Global config

AwesomeSnackbar.configure(AwesomeConfig(
  position: AwesomePosition.bottom,
  animation: AwesomeAnimation.bounce,
  duration: Duration(seconds: 3),
  borderRadius: BorderRadius.circular(20),
  blur: true,                          // glassmorphism globally
  maxVisible: 3,
  stackedMode: false,
  showProgress: true,
  defaultHaptic: AwesomeHaptic.light,
  enableHistory: true,
  showTimestamp: true,
  overlayOpacity: 0.2,
  tapThroughEnabled: false,
  safeAreaInsets: true,
));

Custom theme per notification

AwesomeSnackbar.show(AwesomeOptions(
  type: AwesomeType.custom,
  message: "Premium feature unlocked.",
  themeData: AwesomeThemeData(
    backgroundColor: Color(0xFF1E1B4B),
    textColor: Colors.white,
    titleColor: Colors.amber,
    iconColor: Colors.amberAccent,
    actionColor: Colors.amber,
    progressColor: Colors.amber,
    borderColor: Color(0xFF312E81),
    borderWidth: 1,
    elevation: 8,
  ),
));

Gradient background

AwesomeSnackbar.show(AwesomeOptions(
  type: AwesomeType.custom,
  title: "Pro Plan",
  message: "Upgrade to unlock all features.",
  themeData: AwesomeThemeData(
    backgroundColor: Colors.transparent,
    textColor: Colors.white,
    iconColor: Colors.white,
    actionColor: Colors.amber,
    gradient: LinearGradient(
      colors: [Color(0xFF7C3AED), Color(0xFFEC4899)],
    ),
  ),
  actionText: "Upgrade",
  onAction: () => openUpgradeScreen(),
));

Glassmorphism (dart:ui β€” no external package)

AwesomeSnackbar.show(AwesomeOptions(
  type: AwesomeType.success,
  message: "Saved with glass effect!",
  themeData: AwesomeThemeData.glassSuccess(dark: false),
));

Or globally:

AwesomeSnackbar.configure(AwesomeConfig(blur: true));

Custom widget

AwesomeSnackbar.show(AwesomeOptions(
  type: AwesomeType.custom,
  customWidget: Row(
    children: [
      CircleAvatar(backgroundImage: NetworkImage(avatarUrl)),
      SizedBox(width: 12),
      Expanded(
        child: Column(
          crossAxisAlignment: CrossAxisAlignment.start,
          children: [
            Text("Alice sent you a message"),
            Text("Hey! Are you free tonight?",
                style: TextStyle(fontSize: 12)),
          ],
        ),
      ),
    ],
  ),
));

Custom animation builder

AwesomeSnackbar.show(AwesomeOptions(
  message: "Custom animation!",
  animationBuilder: (controller, child) {
    return SlideTransition(
      position: Tween(begin: Offset(-2, 0), end: Offset.zero).animate(
        CurvedAnimation(parent: controller, curve: Curves.elasticOut),
      ),
      child: child,
    );
  },
));

🎞️ Animations (9 built-in)

Name Description
AwesomeAnimation.slide Slides in from the nearest edge
AwesomeAnimation.fade Fades in/out smoothly
AwesomeAnimation.scale Scales from center with ease-out-back
AwesomeAnimation.elastic Spring-like elastic entrance
AwesomeAnimation.bounce Bouncy entrance
AwesomeAnimation.rotation Rotation + scale + fade
AwesomeAnimation.ios iOS-style cubic-emphasized curve
AwesomeAnimation.flip 3D card-flip entrance β˜…
AwesomeAnimation.path Follows a custom Path β˜…

πŸ“‹ Queue & Priority

// Standard FIFO order
AwesomeSnackbar.show(AwesomeOptions(
  message: "Normal",
  priority: AwesomePriority.normal,
));

// Jumps ahead of normal items
AwesomeSnackbar.show(AwesomeOptions(
  message: "Important!",
  priority: AwesomePriority.high,
));

// Goes to the front immediately
AwesomeSnackbar.show(AwesomeOptions(
  type: AwesomeType.error,
  message: "Critical error!",
  priority: AwesomePriority.critical,
));

πŸ”‘ Duplicate Prevention

// Only one notification is ever shown, even if called multiple times
for (int i = 0; i < 5; i++) {
  AwesomeSnackbar.show(AwesomeOptions(
    message: "You are offline",
    key: "offline_banner",
  ));
}

🌐 Platform Support

Platform Supported
Android βœ…
iOS βœ…
Web βœ…
Windows βœ…
macOS βœ…
Linux βœ…

🧩 State Management

Zero dependency on any state management solution:

  • βœ… GetX β€” call AwesomeSnackbar.success(...) anywhere
  • βœ… Provider β€” no setup needed
  • βœ… Riverpod β€” works in any ref.read() or callback
  • βœ… Bloc / Cubit β€” call from BlocListener
  • βœ… MobX β€” call from reactions
  • βœ… Stacked β€” call from ViewModelBuilder
  • βœ… setState β€” just call it!

πŸ—ΊοΈ Roadmap

  • ❌ Rich push-style notifications (image, large icon)
  • ❌ Persistent notification badge widget
  • ❌ Swipe-right to mark as actioned
  • ❌ Cross-session history persistence (SharedPreferences)
  • ❌ Notification grouping collapse UI

🀝 Contributing

Contributions, issues, and feature requests are welcome!

  1. Fork the repo
  2. Create your feature branch: git checkout -b feat/amazing-feature
  3. Commit: git commit -m 'feat: add amazing feature'
  4. Push: git push origin feat/amazing-feature
  5. Open a pull request

πŸ“„ License

MIT License Β© 2025 Mysterious Coder

Libraries

flutter_awesome_snackbar
flutter_awesome_snackbar β€” The ultimate Flutter notification plugin.