I have a conditional statement to render two different views based on the state. However, when the state changes the view just blinks in with white flash, are there any ways to make it look nicer, like a slower tranistion or any other kind of animations?
body: children: [
context.watch<ItemProvider>().hasItem
? MyView()
: MyOtherView(),
...
AnimatedSwitcher is the best option for you. You can learn more from this medium article
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With