MacroMath UI
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

Weight saved successfully!
Something went wrong.
Your target is almost reached.
Synced 3 seconds ago.

Types

TypeColorUse
successgreenAction completed.
errororange-redSomething went wrong.
warningamberWarning.
infoblueInformation.

Usage

import 'package:macromath_mobile/presentation/widgets/custom_toast.dart';

showCustomToast(
  context,
  message: 'Weight saved successfully!',
  type: ToastType.success,
);

Fire each type in the WidgetbookFeedback › Toast.

On this page