koukibadr/Motion-Toast

Not `dismissable`

Closed this issue · 5 comments

    MotionToast.error(
      title: Text('Error'),
      animationType: ANIMATION.fromRight,
      position: MOTION_TOAST_POSITION.top,
      description: Text('desc'),
    ).show(context);
  

With the above code, I have to wait till the toast leaves before the app resumes.
If I didn't use MOTION_TOAST_POSITION.top, it works well.
So, it does not dismiss (on click) when position is set to top.

More so, if you remove animationType from the above code snippet, it doesn't show the toast
Thanks

I've seen the reason for not showing the toast, it is the assertion:

   assert(
      (position == MOTION_TOAST_POSITION.bottom &&
              animationType != ANIMATION.fromTop) ||
          (position == MOTION_TOAST_POSITION.top &&
              animationType != ANIMATION.fromBottom) ||
          (position == MOTION_TOAST_POSITION.center),
    );

@jobic10 thanks for your feedback and your contribution I will publish a new version ASAP
I will let you know once I publish

Hello again @jobic10 I just published a new version of the package check it out
https://pub.dev/packages/motion_toast

It's cool ☺
Thanks for this 🚀