Components · App
Toast
Top-of-screen notification with a color band and per-type icon.
App · Flutter · macromath_mobile
A notification that slides in from the top, with a color band and icon depending on
the type. Auto-dismisses, or tap to close. Imported from macromath_mobile.
Preview
Types
| Type | Color | Use |
|---|---|---|
success | green | Action completed. |
error | orange-red | Something went wrong. |
warning | amber | Warning. |
info | blue | Information. |
Usage
import 'package:macromath_mobile/presentation/widgets/custom_toast.dart';
showCustomToast(
context,
message: 'Weight saved successfully!',
type: ToastType.success,
);Fire each type in the Widgetbook → Feedback › Toast.