Skip to content

Conversation

@jensvrai
Copy link

The only real change is the adding of isAppearing function. Still needed 6 commits though :)

  /// Checks if the flushbar is appearing
  bool isAppearing() {
    return _flushbarRoute?.currentStatus == FlushbarStatus.IS_APPEARING;
  }

In my project I'm loading a flushbar when certain conditions are met, but sometimes I got double renders. But when I check the isAppearing()

Flushbar offlineFlushbar = Flushbar<bool>(
  message: "Je bent offline",
);

In my builder

WidgetsBinding.instance.addPostFrameCallback((_) {
  if (!offlineFlushbar.isShowing() &&
      !offlineFlushbar.isAppearing()) {
    offlineFlushbar.show(context);
  }
});

@@ -1,3 +1,3 @@
sdk.dir=/Users/andrehaueisen/Library/Android/sdk
flutter.sdk=/Users/andrehaueisen/Development/flutter

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jensvrai you're going to want to revert this change
@AndreHaueisen this probably should have been gitignored?

@danielRi
Copy link

Any news on this? We need this fix.

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

Successfully merging this pull request may close these issues.

3 participants