showToast method

dynamic showToast(
  1. String message
)

Implementation

showToast(String message) {
  if (shakeKey.currentContext == null) return;
  MotionToast.error(
    description: Text(message),
    toastDuration: Duration(seconds: 5),
    constraints: BoxConstraints(maxHeight: 100, minHeight: 50),
    displaySideBar: false,
    animationType: AnimationType.fromTop,
    position: MotionToastPosition.top,
  ).show(shakeKey.currentContext!);
}