-1

I tried flutter tabbar. By default, the style is the picture below ( the second )

How to make is look like the first (Stroke and background color instead of simple underline )

enter image description here

TSR
  • 17,242
  • 27
  • 93
  • 197

1 Answers1

2

I found some cool tricks https://medium.com/flutterpub/flutter-boring-tab-to-cool-tab-bfcb1a93f8d0

 new TabBar(
                    unselectedLabelColor: Colors.redAccent,
                    indicatorSize: TabBarIndicatorSize.tab,
                    indicator: BoxDecoration(
                        gradient: LinearGradient(
                            colors: [Colors.redAccent, Colors.orangeAccent]),
                        borderRadius: BorderRadius.circular(50),
                        color: Colors.redAccent),

                    controller: controller.tabsCtrl,
                    tabs: [
                      Tab(
                        child: Align(
                          alignment: Alignment.center,
                          child: Text("RIDES"),
                        ),
                      ),
                      Tab(
                        child: Align(
                          alignment: Alignment.center,
                          child: Text("REQUESTS"),
                        ),
                      ),
                    ],
                  )
TSR
  • 17,242
  • 27
  • 93
  • 197