IAmSarthakVerma / NestedTabBar-Flutter

An application to learn how to build a Nested Tab Bar in Flutter.
https://medium.com/@IAmSarthakVerma/build-a-nested-tabbar-in-flutter-7e0cae5cfc7
44 stars 14 forks source link

Does not work as expected #4

Open marchellodev opened 3 years ago

marchellodev commented 3 years ago

Nested TabBarView means that when user scrolls the last element of the TabBarView that is inside, the swipe seamlessly transitions to the main TabBarView. This project, however, just puts TabBarView inside another one and adds some paddings. Therefore, there is no seamless transition.

Video that clearly demonstrates that: https://drive.google.com/file/d/1JfkuPrH11dTBJQpQu5vYC90Cuf8RYNiU/view

If someone finds out how to code a real nested TabBarView - please let me know :)

marchellodev commented 3 years ago

I found a solution !!!

We can use PageView instead of TabBarView. Now we just need to manually attach PageView to the TabBar. I've added a small snippet of how this could be done below.

I think it would be pretty cool to make this into a package. @IAmSarthakVerma What do you think?

Demo: https://drive.google.com/file/d/1CrY_KKxFj8IG_QPL54PKPy5HSlemUtCc/view?usp=sharing

Screenshot 2020-12-04 004028

marchellodev commented 3 years ago

Nevermind, there is already a package for just that https://github.com/wilin52/union_tabs

lol