toast function

void toast (
  1. String message,
  2. {ToastPosition position: ToastPosition.bottom,
  3. double radius: 32,
  4. EdgeInsets padding: const EdgeInsets.symmetric(vertical: kSpaceLittleBig, horizontal: kSpaceBig),
  5. TextStyle textStyle,
  6. VoidCallback onDismiss,
  7. bool dismissOtherToast: true,
  8. TextAlign textAlign,
  9. bool error: false}
)

Implementation

void toast(
  String message, {
  ToastPosition position = ToastPosition.bottom,
  double radius = 32,
  EdgeInsets padding = const EdgeInsets.symmetric(
    vertical: kSpaceLittleBig,
    horizontal: kSpaceBig,
  ),
  TextStyle textStyle,
  VoidCallback onDismiss,
  bool dismissOtherToast = true,
  TextAlign textAlign,
  bool error = false,
}) {
  showToast(
    message,
    position: position,
    backgroundColor: error ? Colors.red : Colors.grey,
    radius: radius,
    textPadding: padding,
    textStyle: textStyle,
    onDismiss: onDismiss,
    dismissOtherToast: dismissOtherToast,
    textAlign: textAlign,
  );
}