|
@@ -0,0 +1,57 @@
|
|
|
+import 'package:flutter/material.dart';
|
|
|
+
|
|
|
+class IndexPage extends StatefulWidget {
|
|
|
+ const IndexPage({super.key});
|
|
|
+
|
|
|
+ @override
|
|
|
+ State<IndexPage> createState() => _IndexPageState();
|
|
|
+}
|
|
|
+
|
|
|
+class _IndexPageState extends State<IndexPage> {
|
|
|
+ int index = 0;
|
|
|
+ @override
|
|
|
+ Widget build(BuildContext context) {
|
|
|
+ return Scaffold(
|
|
|
+ appBar: AppBar(
|
|
|
+ title: const Text('Maps Sample App'),
|
|
|
+ backgroundColor: Colors.green[700],
|
|
|
+ ),
|
|
|
+ bottomNavigationBar: BottomNavigationBar(items: [
|
|
|
+ BottomNavigationBarItem(icon: Icon(Icons.home), label: '出行'),
|
|
|
+ BottomNavigationBarItem(icon: Icon(Icons.business), label: '周边惠'),
|
|
|
+ BottomNavigationBarItem(icon: Icon(Icons.school), label: '打车'),
|
|
|
+ BottomNavigationBarItem(icon: Icon(Icons.school), label: '我的'),
|
|
|
+ ]),
|
|
|
+ drawer: Drawer(
|
|
|
+ child: ListView(
|
|
|
+ padding: EdgeInsets.zero,
|
|
|
+ children: <Widget>[
|
|
|
+ const DrawerHeader(
|
|
|
+ decoration: BoxDecoration(
|
|
|
+ color: Colors.green,
|
|
|
+ ),
|
|
|
+ child: Text('Drawer Header'),
|
|
|
+ ),
|
|
|
+ ListTile(
|
|
|
+ title: const Text('Item 1'),
|
|
|
+ onTap: () {
|
|
|
+ Navigator.pop(context);
|
|
|
+ },
|
|
|
+ ),
|
|
|
+ ListTile(
|
|
|
+ title: const Text('Item 2'),
|
|
|
+ onTap: () {
|
|
|
+ Navigator.pop(context);
|
|
|
+ },
|
|
|
+ ),
|
|
|
+ ],
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ body: buildContent(index),
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ buildContent(int index) {
|
|
|
+ return Placeholder();
|
|
|
+ }
|
|
|
+}
|