cmdrootaccess / another-flushbar

A flexible widget for user notification. Customize your text, button, duration, animations and much more. For Android devs, it is made to replace Snackbars and Toasts.
https://pub.dev/packages/another_flushbar
MIT License
146 stars 90 forks source link

Swiping back while flushbar is dismissing freezes swiping animation #7

Closed tomk9 closed 3 years ago

tomk9 commented 3 years ago

Video:

https://user-images.githubusercontent.com/15803067/109150000-8f55c880-7768-11eb-819f-8bd5efa25045.MP4

Steps to Reproduce:

iPhone only

  1. Go to next page.
  2. Show flushbar.
  3. Start swiping back and release while flushbar is dismissing.
  4. Swiping animation freezes.

    Code:

    
    import 'package:another_flushbar/flushbar.dart';
    import 'package:flutter/material.dart';

void main() { runApp(MyApp()); }

class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( title: 'Flushbar Error', theme: ThemeData( primarySwatch: Colors.blue, visualDensity: VisualDensity.adaptivePlatformDensity, ), home: MyHomePage(), ); } }

class MyHomePage extends StatelessWidget { @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: Text('First Page'), ), body: Center( child: RaisedButton( onPressed: () { Navigator.push( context, MaterialPageRoute( builder: (context) => SecondPage(), ), ); }, child: Text( 'Go to second page', ), ), ), ); } }

class SecondPage extends StatelessWidget { @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: Text('Second Page'), ), body: Center( child: RaisedButton( onPressed: () { Flushbar( title: "Hey Ninja", message: "Lorem Ipsum is simply dummy text of the printing and typesetting industry", duration: Duration(seconds: 3), )..show(context); }, child: Text( 'Show flushbar', ), ), ), ); } }

cmdrootaccess commented 3 years ago

testing , will make new commit shortly

Albert-Jan commented 3 years ago

With Flutter 2.0, they introduced a MessengerScaffold to solve exactly this issue. https://flutter.dev/docs/release/breaking-changes/scaffold-messenger

The ScaffoldMessenger now handles SnackBars in order to persist across routes and always be displayed on the current Scaffold. By default, a root ScaffoldMessenger is included in the MaterialApp, but you can create your own controlled scope for the ScaffoldMessenger to further control which Scaffolds receive your SnackBars.

cmdrootaccess commented 3 years ago

okay , thanks for the info. i will make the update as soon as possible.

cmdrootaccess commented 3 years ago

fixed in another_flushbar: ^1.10.23

tomk9 commented 3 years ago

I tested with another_flushbar: ^1.10.23 and the bug still exists. @cmdrootaccess should reopen issue.

datpt11 commented 2 years ago

same issue

synstin commented 1 year ago

same issue any update? @cmdrootaccess