Pyramids extends StatefulWidget {
@override
State<Pyramids> createState ()=> _MYcolok();
}
class _MYcolok extends State<Pyramids> with SingleTickerProviderStateMixin {
TabController ?wage;
int val=0;
@override
void initState()
{
wage =TabController(length: 3, vsync: this);
super.initState();
}
List<Widget> BottenNe=[
Container(color: CupertinoColors.destructiveRed,),
Container(color: Colors.brown),
Container(color: CupertinoColors.label,),
];
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(bottom: TabBar(
controller: wage,
// indicatorWeight: ,
labelPadding: EdgeInsets.only(bottom: 7),
indicatorColor: Colors.yellow,
tabs: [
Text("Search"),
Text("YouTube"),
Text("Music")
],
),
),
backgroundColor:Color(0xff000000),
bottomNavigationBar: BottomNavigationBar(
backgroundColor: Color(0xffEEEEEE),
currentIndex: val,
onTap: (vla){
setState(() {
val=vla;
});
},
selectedIconTheme:IconThemeData(color: Colors.black),
selectedLabelStyle: TextStyle(fontWeight: FontWeight.bold,color: Colors.redAccent),
selectedItemColor: Colors.black,
items: [
BottomNavigationBarItem(icon: Icon(Icons.search),label: "Download"),
BottomNavigationBarItem(icon: Icon(Icons.play_arrow_outlined),label: "Paly"),
BottomNavigationBarItem(icon: Icon(Icons.settings),label: "Setting"),
],
),
body: Container(
child: TabBarView(
controller: wage,
children: [
BottenNe[0],
BottenNe[1],
BottenNe[2]
]),
),
),
);
}
}
I want hint
Обсуждают сегодня