Is it possible to setup 2 levels or rows of TabBar using AppBar bottom or I need to use another methods?

Below is the code and expected image:

Widget build(BuildContext context) {

    return new DefaultTabController(
        length: 2,
        child: new Scaffold(
          appBar: new AppBar(
            elevation: 0,
            centerTitle: false,
            bottom: new TabBar(
              tabs: <Widget>[
                new Tab(
                  text: "Tab1",
                ),
                new Tab(
                  text: "Tab2",
                ),
              ]
            ),

          ),

          body: new TabBarView(
            physics: NeverScrollableScrollPhysics(),

            children: <Widget>[
              new Container(
                child: Center(child: Text("Tab1 here"))
              ),
              new Container(
                  child: Center(child: Text("Tab2 here"))
              ),
            ]


          )

        )
    );
  }

2 levels/rows of TabBar

0 Answers