afonsocraposo/buttons_tabbar

How to get the tabBar on the bottom of the screen?

Tristannos opened this issue · 2 comments

i cant get the TabBar on the bottom of the screen.
any one solutions?

Modifying the provided example, I think it should work:

DefaultTabController(
  length: 3,
  child: Column(
    children: <Widget>[
      Expanded(
        child: TabBarView(
          children: <Widget>[
            Center(
              child: Icon(Icons.directions_car),
            ),
            Center(
              child: Icon(Icons.directions_transit),
            ),
            Center(
              child: Icon(Icons.directions_bike),
            ),
          ],
        ),
      ),
      ButtonsTabBar(
        tabs: [
          Tab(
            icon: Icon(Icons.directions_car),
            text: "car",
          ),
          Tab(
            icon: Icon(Icons.directions_transit),
            text: "transit",
          ),
          Tab(icon: Icon(Icons.directions_bike)),
        ],
      ),
    ],
  ),
)

Closing due to inactivity. Feel free to reopen!