I want to have the animation like this when switch between grid view and list view. How can I do it in Flutter?
Simply creating a ListView and a GridView, using a bool variable to determine which one to show, wrapping each child in a Hero, and when you want to switch, changing the value of the said bool variable and then pushing the same route works. See here: https://dartpad.dev/05785dfd91a02e55d68a6cd086dcbf0b
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