diff --git a/lib/main.dart b/lib/main.dart index ace0d59..da01630 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -19,12 +19,7 @@ class App extends StatelessWidget { primarySwatch: Colors.blue, ), debugShowCheckedModeBanner: false, - builder: (context, child) => BaseWidget(child: child), - initialRoute: '/', - routes: { - '/': (context) => FirstRoute(), - '/second': (context) => SecondRoute(), - }, + home: const HomePage() ); } } @@ -126,37 +121,6 @@ class _HomePageState extends State with SingleTickerProviderStateMixin } } -class BaseWidget extends StatelessWidget { - final Widget? child; - const BaseWidget({super.key, this.child}); - - List _showChild() { - if (child != null) { - return [ - Expanded(child: child!), - ]; - } else { - return []; - } - } - - @override - Widget build(BuildContext context) { - return Scaffold( - appBar: AppBar( - title: const Text( - 'some menu', - style: TextStyle( - color: Colors.white, - ), - )), - body: Column( - children: _showChild(), - ), - ); - } -} - class FirstRoute extends StatelessWidget { const FirstRoute({super.key}); diff --git a/lib/sliding_menu.dart b/lib/sliding_menu.dart index da1baf8..613fe45 100644 --- a/lib/sliding_menu.dart +++ b/lib/sliding_menu.dart @@ -11,11 +11,69 @@ class _SlidingMenuState extends State { @override Widget build(BuildContext context) { return Container( - color: Colors.black, - child: Center( - child: Column(mainAxisAlignment: MainAxisAlignment.center, children: const [ - Text('This is the menu', style: TextStyle(color: Colors.white)), - ])), - ); + color: Colors.black, + child: ListView(padding: EdgeInsets.only(top: 32), children: [ + Container( + padding: const EdgeInsets.only(top: 15, bottom: 15), + decoration: BoxDecoration(border: Border(bottom: BorderSide(color: Colors.white), top: BorderSide(color: Colors.white))), + child: ListTile( + leading: const Icon( + Icons.check_outlined, + color: Colors.white, + size: 50, + ), + title: const Text('Todo List (Personal)', + style: TextStyle( + fontSize: 30, + color: Colors.white, + )), + onTap: () { + // Update the state of the app. + // ... + }, + ), + ), + Container( + margin: const EdgeInsets.only(top: 100), + padding: const EdgeInsets.only(top: 15, bottom: 15), + decoration: const BoxDecoration(border: Border(bottom: BorderSide(color: Colors.white))), + child: ListTile( + leading: const Icon( + Icons.flag_outlined, + color: Colors.white, + size: 40, + ), + title: const Text('Feature Tour', + style: TextStyle( + fontSize: 25, + color: Colors.white, + )), + onTap: () { + // Update the state of the app. + // ... + }, + ), + ), + Container( + padding: const EdgeInsets.only(top: 15, bottom: 15), + decoration: const BoxDecoration(border: Border(bottom: BorderSide(color: Colors.white))), + child: ListTile( + leading: const Icon( + Icons.settings, + color: Colors.white, + size: 40, + ), + title: const Text('Settings', + style: TextStyle( + fontSize: 25, + color: Colors.white, + )), + onTap: () { + // Update the state of the app. + // ... + }, + ), + ), + ])); } }