Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems encountered in using toastification #109

Open
laterdayi opened this issue May 23, 2024 · 16 comments
Open

Problems encountered in using toastification #109

laterdayi opened this issue May 23, 2024 · 16 comments
Assignees
Labels
bug Something isn't working

Comments

@laterdayi
Copy link

laterdayi commented May 23, 2024

I have been using bot_toast before and I want to switch to toastification, but I encountered some problems, I hope the author can solve them

  1. The animation is slow, it seems that the transition animation is very slow,I don't know if it's a performance issue or an animation transition issue
  2. I will close all toast before displaying, but the animation position will be wrong
  3. Blank display when clicked quickly
  4. Supports the configuration style, width, height....

How should these problems be solved

@payam-zahedi

@laterdayi laterdayi added the bug Something isn't working label May 23, 2024
@laterdayi
Copy link
Author

laterdayi commented May 23, 2024

bot_toast

Code_7HFzmaqaDQ

toastification

mobile_MzhoQ0LrOh

@laterdayi
Copy link
Author

  void handle() {
    toastification.dismissAll();
    toastification.show(
      type: ToastificationType.error,
      style: ToastificationStyle.flatColored,
      title: const Text('Fail),
      alignment: Alignment.bottomCenter,
      showProgressBar: false,
      autoCloseDuration: const Duration(seconds: 4),
      animationBuilder: (
        context,
        c,
        alignment,
        child,
      ) {
        return Transform.translate(
          offset: Tween<Offset>(
            begin: const Offset(0, 40),
            end: const Offset(0, 0),
          ).evaluate(c),
          child: Transform.scale(
            scale: Tween<double>(begin: 0.7, end: 1.0).evaluate(c),
            child: Opacity(
              opacity: c.value,
              child: child,
            ),
          ),
        );
      },
    );
  }

@laterdayi
Copy link
Author

I'm expecting the animations to be consistent when I switch to toastification

@payam-zahedi
Copy link
Owner

Thanks @laterdayi for this issue

Have you tried this?

dissmissAll method has an argument that you can set.

toastification.dismissAll(delayForAnimation: false);

@payam-zahedi
Copy link
Owner

I have to double check this issue

@payam-zahedi payam-zahedi self-assigned this May 23, 2024
@laterdayi
Copy link
Author

laterdayi commented May 23, 2024

I set the parameters, but these problems still exist
@payam-zahedi

toastification.dismissAll(delayForAnimation: false);
    toastification.show(
      type: ToastificationType.error,
      style: ToastificationStyle.flatColored,
      title: const Text('Fail'),
      alignment: Alignment.bottomCenter,
      showProgressBar: false,
      autoCloseDuration: const Duration(seconds: 4),
      animationBuilder: (
        context,
        animation,
        alignment,
        child,
      ) {
        return Transform.translate(
          offset: Tween<Offset>(
            begin: const Offset(0, 40),
            end: const Offset(0, 0),
          ).evaluate(animation),
          child: Transform.scale(
            scale: Tween<double>(begin: 0.7, end: 1.0).evaluate(animation),
            child: Opacity(
              opacity: animation.value,
              child: child,
            ),
          ),
        );
      },
    );

@laterdayi
Copy link
Author

Code_StySP7LyjL.mp4

I re-summarized the problem

  1. In the first second of the video, I double-clicked twice. Although I had set dismissAll(delayForAnimation: false), it still toasted twice.
  2. 3-5 seconds into the video, I keep clicking but the toast animation is out of position
  3. In the 6-8 seconds of the video, quick click does not close the animation, does not show the animation, and displays blank
  4. Present on first click, The animation is slow, it seems that the transition animation is very slow, I don't know if it's a performance issue or an

@laterdayi
Copy link
Author

laterdayi commented May 23, 2024

mobile_oIbyXuwTVi.mp4

This is about the first time the pop-up is slow, the first time is always slow, after the click is normal speed

@laterdayi
Copy link
Author

Is there a plan to fix it?
@payam-zahedi

@payam-zahedi
Copy link
Owner

Hey @laterdayi
Basicly this is not a bug,

It's a new feature that we have to add to the package

This is a feature that helps user to only show one toast in screen.

@payam-zahedi
Copy link
Owner

For now, I'm not sure most of the users need this.

So let's give it more time

@laterdayi
Copy link
Author

This should be a series of side effects brought about by manually closing all, resulting in the inability to manually close all

@payam-zahedi
Copy link
Owner

Let me try it in this weekend to see how we can deal with it

@laterdayi
Copy link
Author

Thanks for your help, looking forward to it

@Pluto1219
Copy link

Let me try it in this weekend to see how we can deal with it

I feel that the author has provided such a good plug-in. At present, I feel that the toastification.show pop-up does have a delay of about 300 milliseconds. I hope the author can help us check it. Thank you very much.

@maxfrees
Copy link

any update @payam-zahedi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants