bodyto implement our effect with the
DefaultTabController. It will contain the
TabBar, the bottom part is the
TabBarView. You should know, the order and the location aren't mattered between
TabBarView, but they should be in the vertical direction.
TabBaris a bit difficult for us. So let's look at it.
Tablist here, Let's look at the constructor of the
childare all widgets, the text is a string. Let's use them to see the effect.
text,icon, you can't use both of them. Let's use the
isScrollable =trueto scroll the tab.
indicatorColorset the color of the bottom line, the
indicatorWeightset the height of the line, the
indicatorSizeset the type of the line.
indicatorPadding, it will show as follows .
Decoration. It has three main subclasses we can use.
TabBar. There are so many custom indicators here that you can choose. The most important thing you should care is that some parameters aren't used at the same time.