import 'dart:ffi'; import 'package:flutter/material.dart'; import 'testUI.dart'; class Navigation extends StatefulWidget { const Navigation({super.key}); @override State createState() => _NavigationState(); } class _NavigationState extends State { int _selectedIndex = 0; static const List _widgetOptions = [ TestUI(), Text("Inbox"), Text("Notes"), ]; void _onItemTapped(int index) { setState(() { _selectedIndex = index; }); } @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: Text("BottomNavBar"), ), body: Center(child: _widgetOptions.elementAt(_selectedIndex)), bottomNavigationBar: BottomNavigationBar( items: const [ BottomNavigationBarItem( icon: Icon(Icons.calendar_today), label: "today"), BottomNavigationBarItem(icon: Icon(Icons.inbox), label: "Inbox"), BottomNavigationBarItem(icon: Icon(Icons.note), label: "Notes"), ], currentIndex: _selectedIndex, onTap: _onItemTapped, ), ); } }