toast
0.3.0, released 5 years ago by an unverified publisher
Shows brief overlay messages (toasts) on Flutter apps.
What it does
Provides a simple API to display short, transient messages at the top, center, or bottom of the screen. Supports basic styling such as text style, background color, radius, and optional border. Includes web support.
AI-written summary of version 0.3.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need lightweight, quick user feedback without a full dialog
- You want a cross‑platform toast that works on web as well as mobile
Skip it when
- You require complex animations or rich media in notifications
- You need advanced notification features like scheduling or push integration
Strengths
- Very easy to use with a single static call
- Customizable appearance (text style, background, radius, border)
- Web support added in recent versions
Weaknesses
- Limited to simple text messages
- No built‑in support for action buttons or callbacks
Setup
- Kind
- Plugin (native code)
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
Call ToastContext.init(context) once (e.g., in your root widget) before showing toasts
import 'package:toast/toast.dart';
void showSample(BuildContext context){
ToastContext.init(context);
Toast.show('Hello toast', duration: Toast.lengthShort, gravity: Toast.bottom);
}Alternatives
Packages that do the same job and could replace toast.
- fluttertoast
More mature, supports Android/iOS natively and offers additional positioning options
85Compare - toastification
Provides richer styling and animation options
91Compare - bot_toast
Offers extensive customization, queues, and integrates with Scaffold
50Compare