π 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
π 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,
);
π 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,
);
πΈ 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
GitHub
π 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)