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