首页 > 解决方案 > How to design custom labels for flutter tabs using box decoration?

问题描述

I want to know how to make the following tabs UI in flutter using box decoration?

Fluter tab design

So far I have achieved following UI with the help of applying shape decoration to indicator using the following code

indicator: ShapeDecoration(
                              shape: RoundedRectangleBorder(
                                borderRadius: BorderRadius.only(
                                    topLeft: const Radius.circular(10.0),
                                    topRight: const Radius.circular(10.0)),
                              ),
                              gradient: LinearGradient(
                                  begin: Alignment(0.5, 0),
                                  end: Alignment(0.5, 1),
                                  colors: [
                                    const Color(0xff494949),
                                    const Color(0xff3a3a3a)
                                  ])),
                        ),

actual tabs

标签: flutterflutter-layout

解决方案


推荐阅读