Skip to content

Commit

Permalink
refs #31 Add a neumorphic app bar to main, and tuck in a drawer
Browse files Browse the repository at this point in the history
  • Loading branch information
truedat101 committed Feb 22, 2024
1 parent 979eb09 commit 005bdf0
Show file tree
Hide file tree
Showing 4 changed files with 85 additions and 39 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ With regard to data, this is a huge problem to solve with a simple solution. Fo
- Basic Location Support
- Basic Data Magnet (data sync/data logging)
- Basic Time Series Data Viewer
- Neomorphic UI
- Neumorphic UI
- Audio Notifications
- English/Japanese Localization

Expand Down
77 changes: 39 additions & 38 deletions magnet_app/lib/about.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,50 +20,51 @@ class _AboutPageWidgetState extends State<AboutPageWidget> {

return Scaffold(
backgroundColor: const Color(0xFF4bb0c9),
appBar: AppBar(
appBar: NeumorphicAppBar( // AppBar(
centerTitle: true,
toolbarHeight: 80,
backgroundColor: const Color(0xFF4bb0c9),

// toolbarHeight: 80,
// backgroundColor: const Color(0xFF4bb0c9),
title: Image.asset('assets/images/mobilelogo.png'),
),
drawer: Drawer(
child: ListView(
children: [
ListTile(
title: const Text('Home'),
onTap: () {
appState.app_screen = "treatment";
},
),
ListTile(
title: const Text('Privacy'),
onTap: () {
appState.app_screen = "privacy";
child: ListView(
children: [
ListTile(
title: const Text('Home'),
onTap: () {
appState.app_screen = "home";
},
),
ListTile(
title: const Text('Privacy'),
onTap: () {
appState.app_screen = "privacy";

// Navigator.of(context).push(
// MaterialPageRoute(
// builder: (context) => const AboutPageWidget(),
// ),
// );

},
),
ListTile(
title: const Text('Terms'),
onTap: () {
appState.app_screen = "terms";
// Navigator.of(context).push(
// MaterialPageRoute(
// builder: (context) => const AboutPageWidget(),
// ),
// );
},
),
ListTile(
title: const Text('Terms'),
onTap: () {
appState.app_screen = "terms";

// Navigator.of(context).push(
// MaterialPageRoute(
// builder: (context) => const AboutPageWidget(),
// ),
// );

},
)
],
),
),
// Navigator.of(context).push(
// MaterialPageRoute(
// builder: (context) => const AboutPageWidget(),
// ),
// );
},
)
],
),
),
body: const Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
Expand Down
44 changes: 44 additions & 0 deletions magnet_app/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,50 @@ class MyHomePage extends StatelessWidget {
},
),
backgroundColor: NeumorphicTheme.baseColor(context),
appBar: NeumorphicAppBar (
centerTitle: true,
// toolbarHeight: 80,
// backgroundColor: const Color(0xFF4bb0c9),
title: Image.asset('assets/images/magnet_icon.png'),
),
drawer: Drawer(
child: ListView(
children: [
ListTile(
title: const Text('Home'),
onTap: () {
appState.app_screen = "home";
},
),
ListTile(
title: const Text('Privacy'),
onTap: () {
appState.app_screen = "privacy";

// Navigator.of(context).push(
// MaterialPageRoute(
// builder: (context) => const AboutPageWidget(),
// ),
// );

},
),
ListTile(
title: const Text('Terms'),
onTap: () {
appState.app_screen = "terms";

// Navigator.of(context).push(
// MaterialPageRoute(
// builder: (context) => const AboutPageWidget(),
// ),
// );

},
)
],
),
),
body: Center(
child: Column(
mainAxisSize: MainAxisSize.min,
Expand Down
1 change: 1 addition & 0 deletions magnet_app/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ flutter:
# To add assets to your application, add an assets section, like this:
assets:
- assets/images/magnet_splash.jpg
- assets/images/magnet_icon.png
# - images/a_dot_ham.jpeg

# An image asset can refer to one or more resolution-specific "variants", see
Expand Down

0 comments on commit 005bdf0

Please sign in to comment.