ToastifyX 🚀
Premium, highly customizable toast notification system for Flutter. Elevate your app's UI with modern notification styles like Modern, Minimal, Glass, and Flat.

✨ Features
- 🍞 5 Notification Types: Success, Error, Warning, Info, and Loading.
- 🎨 4 Modern Styles:
modern: Vibrant gradients with subtle shadows.minimal: Sleek black design with sharp edges.glass: Transparent blurred background for a frosted-glass look.flat: Clean colored backgrounds without shadows.
- 📍 Positioning: Top or Bottom.
- 🌫️ Backdrop Blur: Enable real-time background blur for a premium feel.
- 🎬 Smooth Animations: Built-in fade and slide transitions.
- 🔘 Action Buttons: Easily add custom action buttons (e.g., "Retry", "Undo").
- 🔡 Auto Dismiss: Fully configurable duration or manual dismiss for loading states.
🚀 Getting started
Add toastify_x to your pubspec.yaml:
dependencies:
toastify_x: ^1.0.0
🛠 Usage
First, add the toastNavigatorKey to your MaterialApp to enable toast support globally without having to pass context every time from deep in the widget tree.
import 'package:toastify_x/toastify_x.dart';
void main() {
runApp(
MaterialApp(
navigatorKey: toastNavigatorKey, // REQUIRED
home: YourHomeScreen(),
),
);
}
Then, show a toast from anywhere:
ToastifyX.show(
context,
message: "Your message here!",
type: ToastType.success,
style: ToastStyle.glass,
position: ToastPosition.top,
enableBlur: true,
);
🎯 Pro Tip: Global Access (No context required!)
If you use the toastNavigatorKey, you can call ToastifyX.show(null, ...) and it will automatically use the root navigator's context.
📱 Demo UI
Check out the example directory for a fully interactive demo app to see all combinations in action!
📜 License
This project is licensed under the MIT License - see the LICENSE file for details.