TabBar在使用的过程中有点类似于新闻或者电商样式中有关导航条下面有一个可以滚动的一行按钮;现在给出演示代码:
Widget _appBar_bottom_demo() {
return MaterialApp(
home: DefaultTabController(
length: 14,
child: Scaffold(
appBar: AppBar(
primary: true,//为false的时候会影响leading,actions、titile组件,导致向上偏移
textTheme: TextTheme(//设置AppBar上面各种字体主题色
// title: TextStyle(color: Colors.red),
),
actionsIconTheme: IconThemeData(color: Colors.blue,opacity: 0.6),//设置导航右边图标的主题色,此时iconTheme对于右边图标颜色会失效
iconTheme: IconThemeData(color: Colors.black,opacity: 0.6),//设置AppBar上面Icon的主题颜色
brightness: Brightness.dark,//设置导航条上面的状态栏显示字体颜色
backgroundColor: Colors.amber,//设置背景颜色
// shape: CircleBorder(side: BorderSide(color: Colors.red, width: 5, style: BorderStyle.solid)),//设置appbar形状
// automaticallyImplyLeading: true,//在leading为null的时候失效
// bottom: PreferredSize(child: Text(‘data’), preferredSi