From 65aa11af7a43762b8befc006123a833c28798921 Mon Sep 17 00:00:00 2001 From: Vladislav Peshkov <2021658@stud.hs-mannheim.de> Date: Wed, 20 Dec 2023 17:24:18 +0100 Subject: [PATCH] Settings page mockup done Icons imported and implemented --- assets/icons/icon-analyze.png | Bin 0 -> 291 bytes assets/icons/icon-logo.png | Bin 0 -> 450 bytes assets/icons/icon-settings.png | Bin 0 -> 424 bytes lib/utils/widgets/BottomNavigationWidget.dart | 14 +- lib/views/settings_page/settings_page.dart | 120 +++++++++++++----- lib/views/statistic/statistic_page.dart | 2 +- pubspec.lock | 26 ++-- pubspec.yaml | 5 +- windows/flutter/CMakeLists.txt | 7 +- 9 files changed, 120 insertions(+), 54 deletions(-) create mode 100644 assets/icons/icon-analyze.png create mode 100644 assets/icons/icon-logo.png create mode 100644 assets/icons/icon-settings.png diff --git a/assets/icons/icon-analyze.png b/assets/icons/icon-analyze.png new file mode 100644 index 0000000000000000000000000000000000000000..670416ffcf91f9f36bbcaeda32303c0e2a58772e GIT binary patch literal 291 zcmeAS@N?(olHy`uVBq!ia0vp^LLkh+1|-AI^@Rf|&H|6fVg?3oVGw3ym^DWND9BhG zi;JFxJz1)&jk)d=u}69^Bzrzi!)$=mOJ3 z_ir68tU{S9H`T9O<8!3SN2ze_)kcz19 j>q*3d1Nq07J^9PZGEJsRp3@>1=m!Q*S3j3^P62J{($9`z9mb$ zo*4r4lo3Y9aH&A2fvM%op-Y(>6t4dWM#rR~n{s1?`VjnPI>Qb% zR%C;VSxQ5T*#!vEgyiM^qb=gGm)|LTy81+0Br{3+TZrLYFIv;HW?~rU#@2>riU%Wx zzo>iIZ*g2nG3*~?D4TN|ocE}cKgW=xcRUuSEsJ(o_@j5)oP_qNZ8g+LsE>s&3|A1^ zl_zs6V2%0(c%2FirUvDhT(j7;v>=oA%{B`d?U++5J6wNO4l+R+tA+%Bmg28$qY7EX svA)Iz%P|bdEap0R*i^l0hs=s|0J|bjs9UEPBLDyZ07*qoM6N<$f-4)livR!s literal 0 HcmV?d00001 diff --git a/assets/icons/icon-settings.png b/assets/icons/icon-settings.png new file mode 100644 index 0000000000000000000000000000000000000000..e71cc3a665921b13a8f84cfbcb8422159f637887 GIT binary patch literal 424 zcmV;Z0ayNsP){uh+txxw5 zFb`*}jC-x4xQ?7<#?ts@tc@oLzoiKKcs72^Im0koMtU~xQiRruf?P%HoNUhWnKU@a zV2gAV^10;qN(Xy=UyMJVQ!aAkRh3i68YfitG%!+5_$a1L4MASB2n$J!@HuMjDMyplsZ zF+NJP#X3$ohN{dwG5KA~)Y|W&ehBytBFw$B#&~D^RJ2afZ7}ZF(U{VB(a_^RV)`5q zc!5?js1Sdm)<}CqE-2s)y};|SKl!vhVIdsap{FpbT}tQ`kv>cnW~6gz_`@${q(tJ_ SiSif#0000 { color: Colors.white, border: Border.all(color: Colors.transparent), borderRadius: - BorderRadius.circular(40), // Adjust radius to fit your design + BorderRadius.circular(35), // Adjust radius to fit your design boxShadow: [ BoxShadow( color: Colors.grey.withOpacity(0.5), @@ -77,17 +77,19 @@ class _CustomBottomNavigationBarState extends State { child: Row( mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [ - _buildNavItem(Icons.stacked_bar_chart, 0), - _buildNavItem(Icons.circle, 1), - _buildNavItem(Icons.settings, 2), + _buildNavItem(Image.asset('assets/icons/icon-analyze.png'), 0), + _buildNavItem(Image.asset('assets/icons/icon-logo.png'), 1), + _buildNavItem(Image.asset('assets/icons/icon-settings.png'), 2), ], ), ), ); } - Widget _buildNavItem(IconData icon, int index) { + Widget _buildNavItem(Image icon, int index) { return Container( + height: 40, + width:40, decoration: _selectedIndex == index ? BoxDecoration( color: Colors.lightGreen, @@ -95,7 +97,7 @@ class _CustomBottomNavigationBarState extends State { ) : null, child: IconButton( - icon: Icon(icon), + icon: icon, color: _selectedIndex == index ? Colors.white : null, onPressed: () => _onItemTapped(index), splashColor: Colors.transparent, diff --git a/lib/views/settings_page/settings_page.dart b/lib/views/settings_page/settings_page.dart index b43b3f8..d8f5684 100644 --- a/lib/views/settings_page/settings_page.dart +++ b/lib/views/settings_page/settings_page.dart @@ -1,43 +1,99 @@ import 'package:flutter/material.dart'; -import 'package:moody/views/settings_page/widgets/SettingsSelectionWdiget.dart'; import '../../utils/widgets/BottomNavigationWidget.dart'; class SettingsPage extends StatelessWidget { @override Widget build(BuildContext context) { - return MaterialApp( - home: Scaffold( - appBar: AppBar(title: Text('Settings Example')), - body: SingleChildScrollView( - child: Column( - children: [ - SettingsSection( - title: 'Account Settings', - items: [ - SettingsItem( - title: 'Profile', - detail: 'View and edit profile', - trailingText: 'View', - url: 'https://example.com/profile', - ), - SettingsItem( - title: 'Privacy', - detail: 'Privacy settings', - onTap: () { - // Handle Privacy tap - }, - ), - ], - ), - // More sections... - ], + return Scaffold( + body: ListView( + children: [ + Container( + padding: EdgeInsets.symmetric(vertical: 16.0), ), - ), - floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked, - floatingActionButton: - CustomBottomNavigationBar(initialSelectedIndex: 2), + // Settings section + ListTile( + title: Text('settings', style: TextStyle(fontWeight: FontWeight.bold)), + ), + ListTile( + title: Text('change color'), + onTap: () => {}, // Implement your logic + ), + Divider(), + // Community section + ListTile( + title: Text('notifications'), + onTap: () => {}, // Implement your logic + ), + Divider(), + // Community section + ListTile( + title: Text('set pin'), + onTap: () => {}, // Implement your logic + ), + Divider(), + // Community section + ListTile( + title: Text('export your data'), + onTap: () => {}, // Implement your logic + ), + Container( + padding: EdgeInsets.symmetric(vertical: 16.0), + ), + ListTile( + title: Text('community', style: TextStyle(fontWeight: FontWeight.bold)), + ), + ListTile( + title: Text('join our discord'), + trailing: Text('fulfilled'), + onTap: () => {}, // Implement your logic + ), + Divider(), + // + ListTile( + title: Text('our instagram'), + trailing: Text('@get_fulfilled'), + onTap: () => {}, // Implement your logic + ), + Divider(), + // + ListTile( + title: Text('share fulfilled with your loved ones'), + onTap: () => {}, // Implement your logic + ), + Container( + padding: EdgeInsets.symmetric(vertical: 16.0), + ), + ListTile( + title: Text('humans behind fulfilled', style: TextStyle(fontWeight: FontWeight.bold)), + ), + ListTile( + title: Text('about us'), + onTap: () => {}, // Implement your logic + ), + Divider(), + // + ListTile( + title: Text('support us'), + onTap: () => {}, // Implement your logic + ), + Divider(), + // + ListTile( + title: Text('give feedback'), + onTap: () => {}, // Implement your logic + ), + Divider(), + // + ListTile( + title: Text('imprint & privacy policy', style: TextStyle(color: Colors.grey)), + onTap: () => {}, // Implement your logic + ), + ], ), + floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked, + floatingActionButton: + CustomBottomNavigationBar(initialSelectedIndex: 0), ); } -} +} \ No newline at end of file diff --git a/lib/views/statistic/statistic_page.dart b/lib/views/statistic/statistic_page.dart index 8394ca6..4de1e8b 100644 --- a/lib/views/statistic/statistic_page.dart +++ b/lib/views/statistic/statistic_page.dart @@ -9,7 +9,7 @@ class StatisticPage extends StatelessWidget { Widget build(BuildContext context) { return MaterialApp( home: Scaffold( - appBar: AppBar(title: Text('StattisitcsSite')), + appBar: AppBar(title: Text('StatisticsSite')), body: Column( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ diff --git a/pubspec.lock b/pubspec.lock index ea204aa..62ad00d 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -37,10 +37,10 @@ packages: dependency: transitive description: name: collection - sha256: f092b211a4319e98e5ff58223576de6c2803db36221657b46c82574721240687 + sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a url: "https://pub.dev" source: hosted - version: "1.17.2" + version: "1.18.0" cupertino_icons: dependency: "direct main" description: @@ -132,10 +132,10 @@ packages: dependency: transitive description: name: meta - sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3" + sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e url: "https://pub.dev" source: hosted - version: "1.9.1" + version: "1.10.0" path: dependency: transitive description: @@ -169,18 +169,18 @@ packages: dependency: transitive description: name: stack_trace - sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5 + sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" url: "https://pub.dev" source: hosted - version: "1.11.0" + version: "1.11.1" stream_channel: dependency: transitive description: name: stream_channel - sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8" + sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.2" string_scanner: dependency: transitive description: @@ -201,10 +201,10 @@ packages: dependency: transitive description: name: test_api - sha256: "75760ffd7786fffdfb9597c35c5b27eaeec82be8edfb6d71d32651128ed7aab8" + sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" url: "https://pub.dev" source: hosted - version: "0.6.0" + version: "0.6.1" url_launcher: dependency: "direct main" description: @@ -281,10 +281,10 @@ packages: dependency: transitive description: name: web - sha256: dc8ccd225a2005c1be616fe02951e2e342092edf968cf0844220383757ef8f10 + sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152 url: "https://pub.dev" source: hosted - version: "0.1.4-beta" + version: "0.3.0" sdks: - dart: ">=3.1.5 <4.0.0" + dart: ">=3.2.0-194.0.dev <4.0.0" flutter: ">=3.13.0" diff --git a/pubspec.yaml b/pubspec.yaml index d4e0c37..f780d88 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -43,7 +43,10 @@ flutter: uses-material-design: true # To add assets to your application, add an assets section, like this: - # assets: + assets: + - assets/icons/icon-analyze.png + - assets/icons/icon-logo.png + - assets/icons/icon-settings.png # - images/a_dot_burr.jpeg # - images/a_dot_ham.jpeg diff --git a/windows/flutter/CMakeLists.txt b/windows/flutter/CMakeLists.txt index 930d207..903f489 100644 --- a/windows/flutter/CMakeLists.txt +++ b/windows/flutter/CMakeLists.txt @@ -10,6 +10,11 @@ include(${EPHEMERAL_DIR}/generated_config.cmake) # https://github.com/flutter/flutter/issues/57146. set(WRAPPER_ROOT "${EPHEMERAL_DIR}/cpp_client_wrapper") +# Set fallback configurations for older versions of the flutter tool. +if (NOT DEFINED FLUTTER_TARGET_PLATFORM) + set(FLUTTER_TARGET_PLATFORM "windows-x64") +endif() + # === Flutter Library === set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/flutter_windows.dll") @@ -92,7 +97,7 @@ add_custom_command( COMMAND ${CMAKE_COMMAND} -E env ${FLUTTER_TOOL_ENVIRONMENT} "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat" - windows-x64 $ + ${FLUTTER_TARGET_PLATFORM} $ VERBATIM ) add_custom_target(flutter_assemble DEPENDS