commit 961607f978204b371d9dfd9884e72ef18f324d70 Author: juan Date: Wed Jul 24 22:12:20 2024 -0400 Initial dump, and side bar diff --git a/README.md b/README.md new file mode 100644 index 0000000..497c683 --- /dev/null +++ b/README.md @@ -0,0 +1,16 @@ +# crab_ui + +A new Flutter project. + +## Getting Started + +This project is a starting point for a Flutter application. + +A few resources to get you started if this is your first Flutter project: + +- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab) +- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook) + +For help getting started with Flutter development, view the +[online documentation](https://docs.flutter.dev/), which offers tutorials, +samples, guidance on mobile development, and a full API reference. diff --git a/assets/back.png b/assets/back.png new file mode 100644 index 0000000..ac5f76c Binary files /dev/null and b/assets/back.png differ diff --git a/assets/communications.png b/assets/communications.png new file mode 100644 index 0000000..375b9be Binary files /dev/null and b/assets/communications.png differ diff --git a/assets/contact-book.png b/assets/contact-book.png new file mode 100644 index 0000000..c663527 Binary files /dev/null and b/assets/contact-book.png differ diff --git a/assets/email.png b/assets/email.png new file mode 100644 index 0000000..a82e893 Binary files /dev/null and b/assets/email.png differ diff --git a/lib/home_page.dart b/lib/home_page.dart new file mode 100644 index 0000000..4b6f968 --- /dev/null +++ b/lib/home_page.dart @@ -0,0 +1,86 @@ +import 'package:flutter/material.dart'; + + +class HomePage extends StatefulWidget { + const HomePage({super.key}); + + @override + State createState() => _HomePageState(); +} + +class _HomePageState extends State { + // bool _isVisible = true; + final GlobalKey _scaffoldKey = GlobalKey(); + + @override + void initState() { + super.initState(); + WidgetsBinding.instance.addPostFrameCallback((_) { + _scaffoldKey.currentState?.openDrawer(); + }); + } + + void _closeDrawer() { + Navigator.of(context).pop(); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + key: _scaffoldKey, + appBar: AppBar( + title: Text("utils"), + + // leading: IconButton( + // icon: Icon(Icons.menu), + // onPressed: () { + // _scaffoldKey.currentState?.openDrawer(); + // }, + // ), + ), + drawer: Container( + width: 70.0, + child: Drawer( + child: ListView( + padding: EdgeInsets.zero, + children: [ + ListTile( + leading: Image.asset('email.png', height: 24, width: 24), + onTap: () { + // Handle email tap + // Navigator.of(context).pop(); // Close the drawer + print("email"); + }, + ), + ListTile( + leading: Image.asset('contact-book.png', height: 24, width: 24), + onTap: () { + print("contact"); + // Handle contact tap + // Navigator.of(context).pop(); // Close the drawer + }, + ), + ListTile( + leading: + Image.asset('communications.png', height: 24, width: 24), + onTap: () { + // Handle calendar tap + // Navigator.of(context).pop(); // Close the drawer + print("communications"); + }, + ), + ListTile( + leading: Image.asset('back.png', height: 24, width: 24), + onTap: () { + // Handle tasks tap + // Navigator.of(context).pop(); // Close the drawer + _closeDrawer(); + }, + ), + ], + ), + ), + ), + ); + } +} diff --git a/lib/main.dart b/lib/main.dart new file mode 100644 index 0000000..a70a96d --- /dev/null +++ b/lib/main.dart @@ -0,0 +1,28 @@ +import 'package:flutter/material.dart'; +import 'home_page.dart'; +import 'email.dart'; + + +void main() { + runApp(const HyM()); +} + +class HyM extends StatelessWidget { + const HyM({super.key}); + + @override + Widget build(BuildContext context){ + return MaterialApp( + debugShowCheckedModeBanner: false, + theme: ThemeData.dark(), + title: 'HyM', + home: const HomePage(), + routes: { + "/email": (context) => EmailPage(), + + }, + ); + } + + +} diff --git a/pubspec.yaml b/pubspec.yaml new file mode 100644 index 0000000..80190ab --- /dev/null +++ b/pubspec.yaml @@ -0,0 +1,30 @@ +name: crab_ui +description: A new Flutter project. + +publish_to: 'none' # Remove this line if you wish to publish to pub.dev + +version: 0.0.1+1 + +environment: + sdk: ^3.1.1 + +dependencies: + flutter: + sdk: flutter + + english_words: ^4.0.0 + provider: ^6.0.0 + +dev_dependencies: + flutter_test: + sdk: flutter + + flutter_lints: ^2.0.0 + +flutter: + uses-material-design: true + assets: + - assets/back.png + - assets/communications.png + - assets/contact-book.png + - assets/email.png \ No newline at end of file