// ignore_for_file: library_private_types_in_public_api import 'package:flutter/material.dart'; //might be useless. keep for now class BottomBar extends StatefulWidget { const BottomBar({Key? key}) : super(key: key); @override _BottomBarState createState() => _BottomBarState(); } class _BottomBarState extends State { int _selectedIndex = 0; // ignore: unused_field static const List _widgetOptions = [ Text('Home Page'), Text('todo'), Text('pro'), ]; void _onItemTapped(int index) { setState(() { _selectedIndex = index; }); } @override Widget build(BuildContext context) { return BottomNavigationBar( items: const [ BottomNavigationBarItem( icon: Icon(Icons.home), label: 'Home', ), BottomNavigationBarItem( icon: Icon(Icons.business), label: 'todo', ), BottomNavigationBarItem( icon: Icon(Icons.school), label: 'pro', ), ], currentIndex: _selectedIndex, selectedItemColor: Colors.amber[800], onTap: _onItemTapped, ); } }