[英]How to create a centered and equal sized tabs, Tab Bar in Flutter
I want to create a Tab bar in which the size of the tabs are independent of the size of the screen, using the default tab bar creates a very long tab when running on a desktop, i want all the tabs to be the same size and be centered as if it were a Row我想创建一个选项卡栏,其中选项卡的大小与屏幕的大小无关,使用默认选项卡栏在桌面上运行时会创建一个很长的选项卡,我希望所有选项卡的大小相同并且像行一样居中
isScrollable: false,
TabBar(
isScrollable: false,
labelPadding: EdgeInsets.all(8.0),
labelStyle:
TextStyle(fontSize: 16.0, fontWeight: FontWeight.w500),
labelColor: Colors.black,
controller: _controller,
)
make: isScrollable: false, now you will have the equal size tabs make: isScrollable: false,现在你将拥有相同大小的标签
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.