toastInfo function

ToastificationItem toastInfo(
  1. String msg
)

Toast utility functions

These functions depend on ToastificationWrapper being present in the widget tree. The toastification global instance is initialized by ToastificationWrapper.

Implementation

// Info toast
ToastificationItem toastInfo(String msg) {
  return toastification.show(
    title: Text(msg),
    type: ToastificationType.info,
    style: ToastificationStyle.flat,
    alignment: Alignment.center,
    backgroundColor: Colors.black,
    foregroundColor: Colors.white,
    autoCloseDuration: const Duration(seconds: 1),
  );
}