AuiToast class

A collection of pre-styled toast (snackbar) helpers.

All methods are static and require a BuildContext that has a ScaffoldMessenger ancestor (i.e. inside a MaterialApp).

Example:

AuiToast.simple(
  context: context,
  text: 'Saved!',
  color: Colors.green,
  textColor: Colors.white,
);

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

light({required BuildContext context, required String text, required Color color, required Color textColor, double width = 300, Duration duration = const Duration(milliseconds: 1200)}) → void
A floating toast with a semi-transparent (light) background.
simple({required BuildContext context, required String text, required Color color, required Color textColor, double width = 300, Duration duration = const Duration(milliseconds: 1200)}) → void
A solid-background floating toast.
withIcon({required BuildContext context, required String text, required IconData icon, required Color iconColor, required Color color, required Color textColor, double width = 300, Duration duration = const Duration(milliseconds: 1200)}) → void
A floating toast with a leading icon.