Skip to content

Toast ​

A self-dismissing message rendered as an OverlayEntry — unlike Snackbar, it doesn't need a Scaffold ancestor.

View source on GitHub ↗

CLI ​

Install this component into your project:

toast
$flutter_beautify add toast

Variants ​

FBToast.show() · .success() · .error() · .warning() · .dismiss()

Key parameters ​

ParameterTypeDefault
contextBuildContextrequired
messageStringrequired
durationDuration2–3 seconds depending on variant
positionToastPosition.bottom

Usage ​

dart
import 'package:your_app/widgets/toast.dart';

FBToast.error(context, message: 'Could not connect');

Released under the MIT License.