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











Nap Code vào PY32F003 dùng Stlink

 Nap Code vào PY32F003 dùng Stlink Bước 1: Cài đặt  KeilC v5.39 theo link sau ( chú ý 5.39 keil c mới nạp ok). https://edge07.111.ir.cdn.ir/...