JackJonson/flutter_styled_toast

Toast was not dismissed after the show

ShelMax opened this issue · 3 comments

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

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.

Thank you for your solution and fix!

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