#sprint-1
This commit is contained in:
parent
b649bfe419
commit
49dafb9324
@ -14,13 +14,6 @@ class TabBarWidget extends StatefulWidget {
|
||||
}
|
||||
|
||||
class _TabBarWidgetState extends State<TabBarWidget> {
|
||||
int _selectedIndex = 0;
|
||||
void _onItemTapped(int index) {
|
||||
setState(() {
|
||||
_selectedIndex = index;
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return SizedBox(
|
||||
@ -70,9 +63,9 @@ class _TabBarWidgetState extends State<TabBarWidget> {
|
||||
),
|
||||
),
|
||||
],
|
||||
currentIndex: _selectedIndex,
|
||||
currentIndex: widget.selectedIndex,
|
||||
selectedItemColor: primaryColor,
|
||||
onTap: _onItemTapped,
|
||||
onTap: widget.onTap,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user