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

Toast was not dismissed after the show #14

Closed
ShelMax opened this issue Feb 25, 2021 · 3 comments
Closed

Toast was not dismissed after the show #14

ShelMax opened this issue Feb 25, 2021 · 3 comments

Comments

@ShelMax
Copy link

ShelMax commented Feb 25, 2021

Thanks for your plugin!
In a new plugin version, 1.5.2+1 has an issue, toast was not dismissed after the show
On 1.5.1+1 all work fine!

pubspec.yaml

dependencies:
  flutter:
    sdk: flutter
  flutter_styled_toast: 1.5.2+1

Material app:

  @override
  Widget build(BuildContext context) {
    return StyledToast(
      child: MaterialApp(
        title: _title,
        home: MyWidget(),
      ),
      locale: const Locale('en', 'US'),
      textStyle: const TextStyle(
        fontSize: 16.0,
        color: Colors.white,
        fontWeight: FontWeight.w800,
      ),
    );
  }

Widget code:

  GestureDetector(
    onTap: () {
      showToast('Toast version flutter_styled_toast: 1.5.2+1');
    },
    child: Container(
      width: 100,
      color: Colors.blue,
    ),
  ),

toast

@ShelMax ShelMax changed the title Toast was not dismissed after showing Toast was not dismissed after the show Feb 25, 2021
@JackJonson
Copy link
Owner

This is a bug, because the reverse animation is empty by default, so the reverse animation will not be executed. The temporary solution is to set the reverse animation [StyledToastAnimation.fade]. I will release a new version to fix this problem.

JackJonson added a commit that referenced this issue Feb 27, 2021
Change default animation to size.
@ShelMax
Copy link
Author

ShelMax commented Feb 27, 2021

Thank you for your solution and fix!

@JackJonson
Copy link
Owner

A new version has been released, using [1.5.2+3].

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants