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
145 stars 89 forks source link

Wait for current showing flushbar to hide before showing a new one #54

Closed RobinLbt closed 1 year ago

RobinLbt commented 2 years ago

I would like to have a flushbar one at a time so that flushbar B waits for flushbar A to hide

Is this even possible?

Varsius commented 2 years ago

Hey, I had the same problem and after trying for bit I think I have got a working solution using the onStatusChanged parameter:

Flushbar(
    duration: Duration(seconds: 3),  
    title: 'Title',  
    message: 'Message',  
    onStatusChanged: (FlushbarStatus? status) {  
      if (status == FlushbarStatus.DISMISSED) {  
        showFlushbarB();  
      }
    },
  ).show(context);
cmdrootaccess commented 1 year ago

closing. solution provided