2021年1月4日星期一

How to modify the default top navigation bar style in flutter

I want to make a top navigation bar with this effect, but it's very difficult to modify the default tab style of tabcontroller! Then I try to use container to modify it by myself. It's very simple, but the problem is that I can't support left and right swiping to switch pages. Because the gesture has been blocked by pageview. So in the end, I think it's better to use the tab provided by the system and then modify the style, some one help me!

enter image description here enter image description here

DefaultTabController(        length: 3,        child: Scaffold(          appBar: AppBar(            bottom: TabBar(              tabs: [                Tab(icon: Icon(Icons.directions_car)),                Tab(icon: Icon(Icons.directions_transit)),              ],            ),          ),        ),      );  
https://stackoverflow.com/questions/65527453/how-to-modify-the-default-top-navigation-bar-style-in-flutter January 01, 2021 at 01:26PM

没有评论:

发表评论