#sprint-1

This commit is contained in:
User3 2025-05-27 16:40:56 +03:00
parent b649bfe419
commit 49dafb9324

View File

@ -14,13 +14,6 @@ class TabBarWidget extends StatefulWidget {
} }
class _TabBarWidgetState extends State<TabBarWidget> { class _TabBarWidgetState extends State<TabBarWidget> {
int _selectedIndex = 0;
void _onItemTapped(int index) {
setState(() {
_selectedIndex = index;
});
}
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return SizedBox( return SizedBox(
@ -70,9 +63,9 @@ class _TabBarWidgetState extends State<TabBarWidget> {
), ),
), ),
], ],
currentIndex: _selectedIndex, currentIndex: widget.selectedIndex,
selectedItemColor: primaryColor, selectedItemColor: primaryColor,
onTap: _onItemTapped, onTap: widget.onTap,
), ),
); );
} }