DEV Community

sakshi angre
sakshi angre

Posted on

Build Beautiful Animated Toasts in Flutter with ToastLift ✨

🚀 Build Beautiful Animated Toasts in Flutter with ToastLift

Toast notifications are one of the most common UI elements in mobile apps, but many default toasts feel outdated and lack customization.

So I built ToastLift — a Flutter package for creating beautiful animated toast notifications with a modern UI.


✨ Features

  • ✅ Success Toast
  • ❌ Error Toast
  • âš ī¸ Warning Toast
  • â„šī¸ Info Toast
  • âŗ Loading Toast

Additional Features:

  • Smooth animations
  • Modern minimal UI
  • Multiple toast positions
  • Lightweight package
  • Easy integration

đŸ“Ļ Installation

Add this to your pubspec.yaml:

```yaml id="j0vjlwm"
dependencies:
toast_lift: ^1.0.0




Run:


```bash id="wq0txo"
flutter pub get
Enter fullscreen mode Exit fullscreen mode

🚀 Usage

Import package:

```dart id="g0i4nm"
import 'package:toast_lift/toast_lift.dart';




Show success toast:


```dart id="q8u0th"
ToastLift.show(
  context,
  title: "Success",
  message: "Profile saved successfully!",
  type: ToastLiftType.success,
);
Enter fullscreen mode Exit fullscreen mode

📍 Custom Positions

```dart id="m4fht7"
ToastLiftPosition.top
ToastLiftPosition.center
ToastLiftPosition.bottom




Example:


```dart id="vst9z0"
ToastLift.show(
  context,
  message: "New update available!",
  type: ToastLiftType.info,
  position: ToastLiftPosition.top,
);
Enter fullscreen mode Exit fullscreen mode

📸 Preview


🛠 Challenges During Development

While building this package, I learned:

  • Flutter package structure
  • Asset management
  • Animations
  • pub.dev publishing
  • GitHub package management

One major issue I faced was animation asset loading inside the example project, which taught me how Flutter packages manage assets differently from normal apps.


🔗 Links

Pub.dev

ToastLift Package

GitHub

ToastLift Repository


🎉 Final Thoughts

Publishing my first Flutter package was an amazing learning experience.

If you are planning to create your first package, start simple and focus on creating something useful for developers.

Thanks for reading 🚀

Sending love to all developers who continue learning, building, failing, improving, and never giving up đŸ’Ģ

Top comments (0)