🍱 Add app icon

 Multiple pages
This commit is contained in:
2025-09-13 02:09:46 +08:00
parent 5ceaf76f16
commit 2575803aa4
83 changed files with 903 additions and 484 deletions

View File

@@ -0,0 +1,43 @@
import 'package:flutter/material.dart';
import 'calculator_home_page.dart';
import 'about_page.dart';
class HomeScreen extends StatefulWidget {
const HomeScreen({super.key});
@override
State<HomeScreen> createState() => _HomeScreenState();
}
class _HomeScreenState extends State<HomeScreen> {
int _selectedIndex = 0;
static const List<Widget> _widgetOptions = <Widget>[
CalculatorHomePage(),
AboutPage(),
];
void _onItemTapped(int index) {
setState(() {
_selectedIndex = index;
});
}
@override
Widget build(BuildContext context) {
return Scaffold(
body: _widgetOptions.elementAt(_selectedIndex),
bottomNavigationBar: BottomNavigationBar(
items: const <BottomNavigationBarItem>[
BottomNavigationBarItem(
icon: Icon(Icons.calculate),
label: 'Calculator',
),
BottomNavigationBarItem(icon: Icon(Icons.info), label: 'About'),
],
currentIndex: _selectedIndex,
onTap: _onItemTapped,
),
);
}
}