Toast
A self-dismissing message rendered as an OverlayEntry — unlike Snackbar, it doesn't need a Scaffold ancestor.
CLI
Install this component into your project:
toast
$
flutter_beautify add toastVariants
FBToast.show() · .success() · .error() · .warning() · .dismiss()
Key parameters
| Parameter | Type | Default |
|---|---|---|
context | BuildContext | required |
message | String | required |
duration | Duration | 2–3 seconds depending on variant |
position | ToastPosition | .bottom |
Usage
dart
import 'package:your_app/widgets/toast.dart';
FBToast.error(context, message: 'Could not connect');