Home > Net >  can titles of tabBar not centered?
can titles of tabBar not centered?

Time:11-21

Can the title of TabBar going to center of Tab? enter image description here

CodePudding user response:

In your TabBar widget make set the isScrollable options to false

TabBar(
        isScrollable: false, //set to false here
        unselectedLabelColor: Colors.grey,
        indicatorColor: Colors.black54,
        tabs: <Tab>[
          Tab(
            text: "Feed",
          ),
          Tab(
            text: "Popular",
          ),
        ],
      ),
  • Related