QC

DefaultTabController Trong flutter

 DefaultTabController Trong flutter

Một cách hiểu :

APPBAR CHỨA :  -  SEARCH :   title: const CupertinoSearchTextField(),

                                -  TABAR :

 bottom: TabBar(
                        tabs: [

                          Tab(child: Text('men screen',style:TextStyle(color: Colors.grey.shade600) ,),),

                          Tab(child: Text('women screen',style:TextStyle(color: Colors.grey.shade600) ,),),

                          Tab(child: Text('shoes screen',style:TextStyle(color: Colors.grey.shade600) ,),),

                        ],
                        ),

và cả 2 được quản lý bởi DTC : DefaultTabController  và Tabbar quản lý bởi length:3 ,


class _homescreenState extends State<homescreen> {
  @override
  Widget build(BuildContext context) {
    return  DefaultTabController(
     
     
              length:3 ,
              child: Scaffold(
             
                  appBar: AppBar(
                      elevation: 0,
                      backgroundColor: Colors.white,
                      title: const CupertinoSearchTextField(),
                      bottom: TabBar(
                        tabs: [

                          Tab(child: Text('men screen',style:TextStyle(color: Colors.grey.shade600) ,),),

                          Tab(child: Text('women screen',style:TextStyle(color: Colors.grey.shade600) ,),),

                          Tab(child: Text('shoes screen',style:TextStyle(color: Colors.grey.shade600) ,),),

                        ],
                        ),
                  ),
             
           
                         ),
    );
  }
}

GIT : https://github.com/ANH2018/Bottom-Navigation-Bar/tree/Bottom_bar_new_window











Giải Toán 10 Kết nối tri thức Bài tập cuối chương III

Giải Toán 10 Kết nối tri thức Bài tập cuối chương III 1. Bài 3.12 trang 44 Toán 10 Tập 1 - Kết nối tri thức 2. Bài 3.13 trang 44 Toán 10 Tập...