3

Help me! I need to change the default snackbar animation in flutter. And I need to change the curve animation when the snackbar appears. I want to change the standard animation to Curves.easeOutBack.

I tried to use animation property of Snackbar but nothing happened. And I tried to use Snackbar().withAnimation(_curve) but also nothing happened.

Artem
  • 31
  • 2
  • Hello, you should consider reading [this](https://stackoverflow.com/help/how-to-ask), include a [Minimal, Reproducible Example](https://stackoverflow.com/help/how-to-ask) and show us what you have tried so far. – Maël Pedretti Feb 09 '22 at 06:57

1 Answers1

0

Use the package called another_flushbar


Flushbar(
  animationDuration: const Duration(seconds: 2),
  forwardAnimationCurve: Curves.easeIn, //  Here you change the curve animation
  reverseAnimationCurve: Curves.easeOut,//  Here you change the curve animation
  duration: const Duration(milliseconds: 3000),
  flushbarPosition: FlushbarPosition.BOTTOM,
  flushbarStyle: FlushbarStyle.FLOATING,
  message: "I am Bottom Snackbar",
  margin: const EdgeInsets.symmetric(vertical: 20),
  ).show(context);
krishnaacharyaa
  • 14,953
  • 4
  • 49
  • 88