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)