diff --git a/assets/icons/MenuIcons/GeneralSettingsIcons/clearCach.svg b/assets/icons/MenuIcons/GeneralSettingsIcons/clearCach.svg new file mode 100644 index 0000000..20ec573 --- /dev/null +++ b/assets/icons/MenuIcons/GeneralSettingsIcons/clearCach.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/MenuIcons/GeneralSettingsIcons/language.svg b/assets/icons/MenuIcons/GeneralSettingsIcons/language.svg new file mode 100644 index 0000000..15bd55d --- /dev/null +++ b/assets/icons/MenuIcons/GeneralSettingsIcons/language.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/MenuIcons/GeneralSettingsIcons/networkDiagnosis.svg b/assets/icons/MenuIcons/GeneralSettingsIcons/networkDiagnosis.svg new file mode 100644 index 0000000..89edd09 --- /dev/null +++ b/assets/icons/MenuIcons/GeneralSettingsIcons/networkDiagnosis.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/MenuIcons/GeneralSettingsIcons/temperatureUnit.svg b/assets/icons/MenuIcons/GeneralSettingsIcons/temperatureUnit.svg new file mode 100644 index 0000000..ff1291a --- /dev/null +++ b/assets/icons/MenuIcons/GeneralSettingsIcons/temperatureUnit.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/assets/icons/MenuIcons/GeneralSettingsIcons/touchTone.svg b/assets/icons/MenuIcons/GeneralSettingsIcons/touchTone.svg new file mode 100644 index 0000000..2d1b5eb --- /dev/null +++ b/assets/icons/MenuIcons/GeneralSettingsIcons/touchTone.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/assets/icons/MenuIcons/GeneralSettingsIcons/voiceAssistant.svg b/assets/icons/MenuIcons/GeneralSettingsIcons/voiceAssistant.svg new file mode 100644 index 0000000..053b9ae --- /dev/null +++ b/assets/icons/MenuIcons/GeneralSettingsIcons/voiceAssistant.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/assets/icons/MenuIcons/HomeManagementIcons/CreateHome.svg b/assets/icons/MenuIcons/HomeManagementIcons/CreateHome.svg new file mode 100644 index 0000000..5d7d222 --- /dev/null +++ b/assets/icons/MenuIcons/HomeManagementIcons/CreateHome.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/assets/icons/MenuIcons/HomeManagementIcons/ManageYourHome.svg b/assets/icons/MenuIcons/HomeManagementIcons/ManageYourHome.svg new file mode 100644 index 0000000..6e729d7 --- /dev/null +++ b/assets/icons/MenuIcons/HomeManagementIcons/ManageYourHome.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/assets/icons/MenuIcons/HomeManagementIcons/joinAHome.svg b/assets/icons/MenuIcons/HomeManagementIcons/joinAHome.svg new file mode 100644 index 0000000..1ad882a --- /dev/null +++ b/assets/icons/MenuIcons/HomeManagementIcons/joinAHome.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/MenuIcons/LeagalInfoIcons/About.svg b/assets/icons/MenuIcons/LeagalInfoIcons/About.svg new file mode 100644 index 0000000..47e30f5 --- /dev/null +++ b/assets/icons/MenuIcons/LeagalInfoIcons/About.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/assets/icons/MenuIcons/LeagalInfoIcons/PrivacyPolicy.svg b/assets/icons/MenuIcons/LeagalInfoIcons/PrivacyPolicy.svg new file mode 100644 index 0000000..c5d1e3d --- /dev/null +++ b/assets/icons/MenuIcons/LeagalInfoIcons/PrivacyPolicy.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/MenuIcons/LeagalInfoIcons/UserAgreement.svg b/assets/icons/MenuIcons/LeagalInfoIcons/UserAgreement.svg new file mode 100644 index 0000000..6cabfad --- /dev/null +++ b/assets/icons/MenuIcons/LeagalInfoIcons/UserAgreement.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/MenuIcons/MessagesCenterIcons/Alerts.svg b/assets/icons/MenuIcons/MessagesCenterIcons/Alerts.svg new file mode 100644 index 0000000..7762dd4 --- /dev/null +++ b/assets/icons/MenuIcons/MessagesCenterIcons/Alerts.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/assets/icons/MenuIcons/MessagesCenterIcons/FAQs.svg b/assets/icons/MenuIcons/MessagesCenterIcons/FAQs.svg new file mode 100644 index 0000000..ab3dc9f --- /dev/null +++ b/assets/icons/MenuIcons/MessagesCenterIcons/FAQs.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/assets/icons/MenuIcons/MessagesCenterIcons/HelpAndFeedback.svg b/assets/icons/MenuIcons/MessagesCenterIcons/HelpAndFeedback.svg new file mode 100644 index 0000000..fb53dd0 --- /dev/null +++ b/assets/icons/MenuIcons/MessagesCenterIcons/HelpAndFeedback.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/MenuIcons/MessagesCenterIcons/Messages.svg b/assets/icons/MenuIcons/MessagesCenterIcons/Messages.svg new file mode 100644 index 0000000..c9a7e35 --- /dev/null +++ b/assets/icons/MenuIcons/MessagesCenterIcons/Messages.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/MenuIcons/SecurityAndPrivacyIcons/Privacy.svg b/assets/icons/MenuIcons/SecurityAndPrivacyIcons/Privacy.svg new file mode 100644 index 0000000..69ea2cd --- /dev/null +++ b/assets/icons/MenuIcons/SecurityAndPrivacyIcons/Privacy.svg @@ -0,0 +1,4 @@ + + + + diff --git a/assets/icons/MenuIcons/SecurityAndPrivacyIcons/Securty.svg b/assets/icons/MenuIcons/SecurityAndPrivacyIcons/Securty.svg new file mode 100644 index 0000000..beecb3e --- /dev/null +++ b/assets/icons/MenuIcons/SecurityAndPrivacyIcons/Securty.svg @@ -0,0 +1,3 @@ + + + diff --git a/lib/features/menu/bloc/menu_cubit.dart b/lib/features/menu/bloc/menu_cubit.dart index 89ece3f..a51a41e 100644 --- a/lib/features/menu/bloc/menu_cubit.dart +++ b/lib/features/menu/bloc/menu_cubit.dart @@ -1,6 +1,4 @@ import 'package:flutter_bloc/flutter_bloc.dart'; -import 'package:syncrow_app/features/menu/model/list_item_model.dart'; -import 'package:syncrow_app/features/menu/model/menu_list_model.dart'; part 'menu_state.dart'; @@ -9,85 +7,85 @@ class MenuCubit extends Cubit { static MenuCubit of(context) => BlocProvider.of(context); - List menuLists = [ - MenuListModel( - label: 'Home Management', - listItems: [ - ListItemModel( - label: 'Create a Home', - ), - ListItemModel( - label: 'Join a Home', - ), - ListItemModel( - label: 'Manage Your Home', - ), - ], - ), - MenuListModel( - label: 'General Settings', - listItems: [ - ListItemModel( - label: 'Voice Assistant', - ), - ListItemModel( - label: 'Temperature unit', - ), - ListItemModel( - label: 'Touch tone on panel', - ), - ListItemModel( - label: 'Language', - ), - ListItemModel( - label: 'Network diagnosis', - ), - ListItemModel( - label: 'Clear cache', - ), - ], - ), - MenuListModel( - label: 'Messages Center', - listItems: [ - ListItemModel( - label: 'Alerts', - ), - ListItemModel( - label: 'Messages', - ), - ListItemModel( - label: 'FAQs', - ), - ListItemModel( - label: 'Help & Feedback', - ), - ], - ), - MenuListModel( - label: 'Security and Privacy', - listItems: [ - ListItemModel( - label: 'Security', - ), - ListItemModel( - label: 'privacy', - ), - ], - ), - MenuListModel( - label: 'Legal Information', - listItems: [ - ListItemModel( - label: 'About', - ), - ListItemModel( - label: 'Privacy Policy', - ), - ListItemModel( - label: 'User Agreement', - ), - ], - ), - ]; + // List menuLists = [ + // MenuListModel( + // label: 'Home Management', + // listItems: [ + // ListItemModel( + // label: 'Create a Home', + // ), + // ListItemModel( + // label: 'Join a Home', + // ), + // ListItemModel( + // label: 'Manage Your Home', + // ), + // ], + // ), + // MenuListModel( + // label: 'General Settings', + // listItems: [ + // ListItemModel( + // label: 'Voice Assistant', + // ), + // ListItemModel( + // label: 'Temperature unit', + // ), + // ListItemModel( + // label: 'Touch tone on panel', + // ), + // ListItemModel( + // label: 'Language', + // ), + // ListItemModel( + // label: 'Network diagnosis', + // ), + // ListItemModel( + // label: 'Clear cache', + // ), + // ], + // ), + // MenuListModel( + // label: 'Messages Center', + // listItems: [ + // ListItemModel( + // label: 'Alerts', + // ), + // ListItemModel( + // label: 'Messages', + // ), + // ListItemModel( + // label: 'FAQs', + // ), + // ListItemModel( + // label: 'Help & Feedback', + // ), + // ], + // ), + // MenuListModel( + // label: 'Security and Privacy', + // listItems: [ + // ListItemModel( + // label: 'Security', + // ), + // ListItemModel( + // label: 'privacy', + // ), + // ], + // ), + // MenuListModel( + // label: 'Legal Information', + // listItems: [ + // ListItemModel( + // label: 'About', + // ), + // ListItemModel( + // label: 'Privacy Policy', + // ), + // ListItemModel( + // label: 'User Agreement', + // ), + // ], + // ), + // ]; } diff --git a/lib/features/menu/model/list_item_model.dart b/lib/features/menu/model/list_item_model.dart deleted file mode 100644 index 70a812a..0000000 --- a/lib/features/menu/model/list_item_model.dart +++ /dev/null @@ -1,9 +0,0 @@ -class ListItemModel { - final String? icon; - final String? label; - - ListItemModel({ - this.icon, - this.label, - }); -} diff --git a/lib/features/menu/model/menu_list_model.dart b/lib/features/menu/model/menu_list_model.dart deleted file mode 100644 index 64aaa14..0000000 --- a/lib/features/menu/model/menu_list_model.dart +++ /dev/null @@ -1,11 +0,0 @@ -import 'list_item_model.dart'; - -class MenuListModel { - final String? label; - final List? listItems; - - MenuListModel({ - this.label, - this.listItems, - }); -} diff --git a/lib/features/menu/view/menu_view.dart b/lib/features/menu/view/menu_view.dart index 1c55a36..ff7e9ca 100644 --- a/lib/features/menu/view/menu_view.dart +++ b/lib/features/menu/view/menu_view.dart @@ -2,12 +2,19 @@ import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:syncrow_app/features/auth/bloc/auth_cubit.dart'; import 'package:syncrow_app/features/menu/bloc/menu_cubit.dart'; +import 'package:syncrow_app/features/menu/view/widgets/home%20management/create_home_view.dart'; +import 'package:syncrow_app/features/menu/view/widgets/join_home/join_home_view.dart'; +import 'package:syncrow_app/features/menu/view/widgets/manage_home/manage_home_view.dart'; import 'package:syncrow_app/features/menu/view/widgets/menu_list.dart'; -import 'package:syncrow_app/features/menu/view/widgets/profile_tab.dart'; +import 'package:syncrow_app/features/menu/view/widgets/privacy/privacy_view.dart'; +import 'package:syncrow_app/features/menu/view/widgets/profile/profile_tab.dart'; +import 'package:syncrow_app/features/menu/view/widgets/securty/securty_view.dart'; import 'package:syncrow_app/features/shared_widgets/default_container.dart'; import 'package:syncrow_app/features/shared_widgets/text_widgets/body_large.dart'; +import 'package:syncrow_app/generated/assets.dart'; import 'package:syncrow_app/navigation/routing_constants.dart'; import 'package:syncrow_app/utils/context_extension.dart'; +import 'package:syncrow_app/utils/resource_manager/color_manager.dart'; import 'package:syncrow_app/utils/resource_manager/constants.dart'; class MenuView extends StatelessWidget { @@ -33,11 +40,10 @@ class MenuView extends StatelessWidget { child: Column( children: [ const ProfileTab(), - ...MenuCubit.of(context).menuLists.map( - (list) => MenuList( - listModel: list, - ), - ), + for (var section in menuSections) + MenuList( + section: section, + ), const SizedBox( height: 15, ), @@ -75,3 +81,123 @@ class MenuView extends StatelessWidget { ); } } + +List> menuSections = [ + //Home Management + { + 'title': 'Home Management', + 'color': ColorsManager.primaryColor, + 'buttons': [ + { + 'title': 'Create a Home', + 'Icon': Assets.homeManagementIconsCreateHome, + 'page': const CreateHomeView() + }, + { + 'title': 'Join a Home', + 'Icon': Assets.homeManagementIconsJoinAHome, + 'page': const JoinHomeView() + }, + { + 'title': 'Manage Your Home', + 'Icon': Assets.homeManagementIconsManageYourHome, + 'page': const ManageHomeView() + }, + ], + }, + //General Settings + { + 'title': 'General Settings', + 'color': const Color(0xFF023DFE), + 'buttons': [ + { + 'title': 'Voice Assistant', + 'Icon': Assets.generalSettingsIconsVoiceAssistant, + 'page': null + }, + { + 'title': 'Temperature unit', + 'Icon': Assets.generalSettingsIconsTemperatureUnit, + 'page': null + }, + { + 'title': 'Touch tone on panel', + 'Icon': Assets.generalSettingsIconsTouchTone, + 'page': null + }, + { + 'title': 'Language', + 'Icon': Assets.generalSettingsIconsLanguage, + 'page': null + }, + { + 'title': 'Network Diagnosis', + 'Icon': Assets.generalSettingsIconsNetworkDiagnosis, + 'page': null + }, + { + 'title': 'Clear Cache', + 'Icon': Assets.generalSettingsIconsClearCache, + 'page': null + }, + ], + }, + //Messages Center + { + 'title': 'Messages Center', + 'color': const Color(0xFF0088FF), + 'buttons': [ + { + 'title': 'Alerts', + 'Icon': Assets.messagesCenterIconsAlerts, + 'page': null + }, + { + 'title': 'Messages', + 'Icon': Assets.messagesCenterIconsMessages, + 'page': null + }, + {'title': 'FAQs', 'Icon': Assets.messagesCenterIconsFAQs, 'page': null}, + { + 'title': 'Help & Feedback', + 'Icon': Assets.messagesCenterIconsHelpAndFeedbacks, + 'page': null + }, + ], + }, + //Security And Privacy + { + 'title': 'Security And Privacy', + 'color': const Color(0xFF8AB9FF), + 'buttons': [ + { + 'title': 'Security', + 'Icon': Assets.securityAndPrivacyIconsSecurty, + 'page': const SecurtyView() + }, + { + 'title': 'Privacy', + 'Icon': Assets.securityAndPrivacyIconsPrivacy, + 'page': const PrivacyView() + }, + ], + }, + //Legal Information + { + 'title': 'Legal Information', + 'color': const Color(0xFF001B72), + 'buttons': [ + {'title': 'About', 'Icon': Assets.leagalInfoIconsAbout, 'page': null}, + { + 'title': 'Privacy Policy', + 'Icon': Assets.leagalInfoIconsPrivacyPolicy, + 'page': null + }, + { + 'title': 'User Agreement', + 'Icon': Assets.leagalInfoIconsUserAgreement, + 'page': null + }, + ], + }, +]; diff --git a/lib/features/menu/view/widgets/home management/create_home_view.dart b/lib/features/menu/view/widgets/home management/create_home_view.dart new file mode 100644 index 0000000..4d3ee08 --- /dev/null +++ b/lib/features/menu/view/widgets/home management/create_home_view.dart @@ -0,0 +1,124 @@ +// ignore_for_file: unnecessary_const +import 'package:flutter/material.dart'; +import 'package:syncrow_app/features/shared_widgets/default_container.dart'; +import 'package:syncrow_app/features/shared_widgets/default_scaffold.dart'; +import 'package:syncrow_app/features/shared_widgets/text_widgets/body_large.dart'; +import 'package:syncrow_app/features/shared_widgets/text_widgets/body_medium.dart'; +import 'package:syncrow_app/features/shared_widgets/text_widgets/body_small.dart'; +import 'package:syncrow_app/utils/context_extension.dart'; +import 'package:syncrow_app/utils/resource_manager/color_manager.dart'; + +class CreateHomeView extends StatelessWidget { + const CreateHomeView({super.key}); + + @override + Widget build(BuildContext context) { + return DefaultScaffold( + actions: [ + TextButton( + onPressed: () {}, + child: const BodyLarge( + text: 'Save', + fontWeight: FontWeight.bold, + ), + ), + ], + title: 'Create Home', + child: Column( + children: [ + //Home Info + DefaultContainer( + padding: const EdgeInsets.symmetric( + horizontal: 25, + vertical: 5, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + const BodyMedium(text: 'Home Name '), + Flexible( + child: TextField( + textAlign: TextAlign.end, + decoration: InputDecoration( + hintText: 'Enter Name', + hintStyle: + context.bodyMedium.copyWith(color: Colors.grey), + border: InputBorder.none, + ), + ), + ), + ], + ), + //Divider + Container( + height: 1, + color: ColorsManager.greyColor, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + const BodyMedium(text: 'Location '), + Flexible( + child: TextField( + textAlign: TextAlign.end, + decoration: InputDecoration( + hintText: 'Set', + hintStyle: + context.bodyMedium.copyWith(color: Colors.grey), + border: InputBorder.none, + ), + ), + ), + ], + ), + ], + ), + ), + + //Rooms Info + const SizedBox(height: 10), + const Row( + children: [ + SizedBox( + width: 25, + ), + BodySmall( + text: 'Rooms', + fontWeight: FontWeight.bold, + ), + ], + ), + DefaultContainer( + padding: const EdgeInsets.symmetric( + horizontal: 25, + vertical: 5, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + TextButton( + onPressed: () { + //TODO add room + }, + child: const Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + BodyMedium( + text: 'Add Room', + fontColor: ColorsManager.primaryColor, + ), + ], + )) + ], + ), + ), + ], + ), + ); + } +} diff --git a/lib/features/menu/view/widgets/join_home/join_home_view.dart b/lib/features/menu/view/widgets/join_home/join_home_view.dart new file mode 100644 index 0000000..25b6e14 --- /dev/null +++ b/lib/features/menu/view/widgets/join_home/join_home_view.dart @@ -0,0 +1,63 @@ +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:syncrow_app/features/shared_widgets/default_container.dart'; +import 'package:syncrow_app/features/shared_widgets/default_scaffold.dart'; +import 'package:syncrow_app/features/shared_widgets/text_widgets/body_medium.dart'; +import 'package:syncrow_app/generated/assets.dart'; +import 'package:syncrow_app/utils/context_extension.dart'; + +class JoinHomeView extends StatelessWidget { + const JoinHomeView({super.key}); + + @override + Widget build(BuildContext context) { + return DefaultScaffold( + title: "Join a Home", + child: Column( + children: [ + SvgPicture.asset( + Assets.homeManagementIconsJoinAHome, + width: 70, + height: 70, + ), + const Padding( + padding: EdgeInsets.symmetric( + vertical: 30, + ), + child: BodyMedium( + textAlign: TextAlign.center, + text: + 'Please contact with the\nadministration to get an invitation\n(Menu → Manage your Home → Add Member)'), + ), + DefaultContainer( + padding: const EdgeInsets.symmetric( + vertical: 5, + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Flexible( + child: TextField( + decoration: InputDecoration( + hintText: 'Invitatoin code', + hintStyle: + context.bodyMedium.copyWith(color: Colors.grey), + border: InputBorder.none, + ), + ), + ), + IconButton( + onPressed: () {}, + icon: const Icon( + Icons.arrow_right_alt, + ), + ), + ], + ), + ), + ], + ), + ); + } +} diff --git a/lib/features/menu/view/widgets/manage_home/home_settings.dart b/lib/features/menu/view/widgets/manage_home/home_settings.dart new file mode 100644 index 0000000..ea9aa46 --- /dev/null +++ b/lib/features/menu/view/widgets/manage_home/home_settings.dart @@ -0,0 +1,174 @@ +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:syncrow_app/features/app_layout/model/space_model.dart'; +import 'package:syncrow_app/features/shared_widgets/default_container.dart'; +import 'package:syncrow_app/features/shared_widgets/default_scaffold.dart'; +import 'package:syncrow_app/features/shared_widgets/text_widgets/body_large.dart'; +import 'package:syncrow_app/features/shared_widgets/text_widgets/body_medium.dart'; +import 'package:syncrow_app/features/shared_widgets/text_widgets/body_small.dart'; +import 'package:syncrow_app/utils/context_extension.dart'; +import 'package:syncrow_app/utils/resource_manager/color_manager.dart'; + +class HomeSettingsView extends StatelessWidget { + const HomeSettingsView({super.key, this.space}); + + final SpaceModel? space; + @override + Widget build(BuildContext context) { + return DefaultScaffold( + title: 'Home Settings', + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + //Home Info + DefaultContainer( + padding: const EdgeInsets.symmetric( + horizontal: 25, + vertical: 10, + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + const BodyMedium(text: 'Name '), + Flexible( + child: TextField( + textAlign: TextAlign.end, + decoration: InputDecoration( + hintText: 'Enter Name', + hintStyle: + context.bodyMedium.copyWith(color: Colors.grey), + border: InputBorder.none, + ), + ), + ), + ], + ), + //Divider + Container( + margin: const EdgeInsets.only(bottom: 10), + height: 1, + color: ColorsManager.greyColor, + ), + const Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + BodyMedium(text: 'Rooms'), + Icon( + Icons.arrow_forward_ios, + color: ColorsManager.greyColor, + size: 15, + ) + ], + ), + //Divider + Container( + height: 1, + margin: const EdgeInsets.only(top: 10), + color: ColorsManager.greyColor, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + const BodyMedium(text: 'Location'), + Flexible( + child: TextField( + textAlign: TextAlign.end, + decoration: InputDecoration( + hintText: 'Set', + hintStyle: + context.bodyMedium.copyWith(color: Colors.grey), + border: InputBorder.none, + ), + ), + ), + ], + ), + ], + ), + ), + //Members Info + const SizedBox( + height: 10, + ), + //TODO connect the members to this GridView + const BodySmall( + text: "Members", + fontWeight: FontWeight.bold, + ), + GridView.builder( + shrinkWrap: true, + gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount( + crossAxisCount: 2, + crossAxisSpacing: 10, + ), + itemCount: 4, + itemBuilder: (context, index) => Stack( + alignment: Alignment.topCenter, + children: [ + DefaultContainer( + margin: const EdgeInsets.only(top: 20), + padding: + const EdgeInsets.symmetric(vertical: 15, horizontal: 40), + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + const SizedBox( + height: 50, + ), + BodyMedium( + text: 'Member ${index + 1}', + fontWeight: FontWeight.bold, + ), + const SizedBox(height: 3), + const BodySmall( + text: 'Syncrow Account', + textAlign: TextAlign.center, + ), + ], + ), + ), + const SizedBox.square( + dimension: 80, + child: CircleAvatar( + backgroundColor: Colors.white, + child: SizedBox.square( + dimension: 77, + child: CircleAvatar( + backgroundColor: ColorsManager.greyColor, + child: Icon(Icons.person), + ), + ), + ), + ) + ], + ), + ), + const Spacer(), + InkWell( + onTap: () {}, + child: Row( + children: [ + Expanded( + child: DefaultContainer( + child: Center( + child: BodyLarge( + text: 'Leave Home', + style: context.bodyLarge.copyWith( + color: Colors.red, + ), + ), + ), + ), + ), + ], + ), + ) + ], + ), + ); + } +} diff --git a/lib/features/menu/view/widgets/manage_home/manage_home_view.dart b/lib/features/menu/view/widgets/manage_home/manage_home_view.dart new file mode 100644 index 0000000..d6eab2a --- /dev/null +++ b/lib/features/menu/view/widgets/manage_home/manage_home_view.dart @@ -0,0 +1,110 @@ +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:syncrow_app/features/app_layout/bloc/home_cubit.dart'; +import 'package:syncrow_app/features/menu/view/widgets/manage_home/home_settings.dart'; +import 'package:syncrow_app/features/shared_widgets/default_container.dart'; +import 'package:syncrow_app/features/shared_widgets/default_scaffold.dart'; +import 'package:syncrow_app/features/shared_widgets/text_widgets/body_medium.dart'; +import 'package:syncrow_app/utils/helpers/custom_page_route.dart'; +import 'package:syncrow_app/utils/helpers/misc_string_helpers.dart'; +import 'package:syncrow_app/utils/resource_manager/color_manager.dart'; + +class ManageHomeView extends StatelessWidget { + const ManageHomeView({super.key}); + + @override + Widget build(BuildContext context) { + var spaces = HomeCubit.getInstance().spaces; + return DefaultScaffold( + title: 'Manage Your Home', + child: spaces == null + ? const Center( + child: CircularProgressIndicator(), + ) + : Column( + children: [ + DefaultContainer( + padding: const EdgeInsets.symmetric( + horizontal: 25, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.start, + children: List.generate( + spaces.length, + (index) { + if (index == spaces.length - 1) { + return InkWell( + onTap: () { + Navigator.of(context).push(CustomPageRoute( + builder: (context) => HomeSettingsView( + space: spaces[index], + ))); + }, + child: Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + BodyMedium( + text: StringHelpers.toTitleCase( + spaces[index].name ?? "")), + const Icon( + Icons.arrow_forward_ios, + color: ColorsManager.greyColor, + size: 15, + ) + ], + ), + ); + } + return InkWell( + onTap: () { + //TODO refactor the routing to use named routes + // Navigator.of(context).pushNamed( + // '/home_settings', + // arguments: spaces[index], + // ); + + Navigator.of(context).push(CustomPageRoute( + builder: (context) => HomeSettingsView( + space: spaces[index], + ))); + }, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + BodyMedium( + text: HomeCubit.getInstance() + .spaces![index] + .name ?? + ""), + const Icon( + Icons.arrow_forward_ios, + color: ColorsManager.greyColor, + size: 15, + ) + ], + ), + Container( + margin: + const EdgeInsets.symmetric(vertical: 15), + height: 1, + color: ColorsManager.greyColor, + ), + ], + ), + ); + }, + ), + ), + ), + ], + )); + } +} diff --git a/lib/features/menu/view/widgets/menu_list.dart b/lib/features/menu/view/widgets/menu_list.dart index 88410c2..511f476 100644 --- a/lib/features/menu/view/widgets/menu_list.dart +++ b/lib/features/menu/view/widgets/menu_list.dart @@ -1,5 +1,4 @@ import 'package:flutter/material.dart'; -import 'package:syncrow_app/features/menu/model/menu_list_model.dart'; import 'package:syncrow_app/features/menu/view/widgets/menu_list_divider.dart'; import 'package:syncrow_app/features/menu/view/widgets/menu_list_item.dart'; import 'package:syncrow_app/features/shared_widgets/default_container.dart'; @@ -8,10 +7,10 @@ import 'package:syncrow_app/features/shared_widgets/text_widgets/body_small.dart class MenuList extends StatelessWidget { const MenuList({ super.key, - required this.listModel, + required this.section, }); - final MenuListModel listModel; + final Map section; @override Widget build(BuildContext context) { @@ -20,7 +19,7 @@ class MenuList extends StatelessWidget { children: [ const SizedBox(height: 5), BodySmall( - text: listModel.label!, + text: section['title'] as String, ), const SizedBox(height: 5), DefaultContainer( @@ -28,10 +27,13 @@ class MenuList extends StatelessWidget { shrinkWrap: true, padding: const EdgeInsets.all(0), physics: const NeverScrollableScrollPhysics(), - itemCount: listModel.listItems!.length, + itemCount: section['buttons'].length, itemBuilder: (context, index) { return MenuListItem( - listItem: listModel.listItems![index]!, + title: section['buttons'][index]['title'] as String, + icon: section['buttons'][index]['Icon'] as String, + page: section['buttons'][index]['page'] as Widget?, + color: section['color'], ); }, separatorBuilder: (context, index) => const MenuListDivider()), diff --git a/lib/features/menu/view/widgets/menu_list_item.dart b/lib/features/menu/view/widgets/menu_list_item.dart index 9facec9..8f8d94b 100644 --- a/lib/features/menu/view/widgets/menu_list_item.dart +++ b/lib/features/menu/view/widgets/menu_list_item.dart @@ -1,43 +1,57 @@ import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.dart'; -import 'package:syncrow_app/features/menu/model/list_item_model.dart'; import 'package:syncrow_app/features/shared_widgets/text_widgets/body_medium.dart'; -import 'package:syncrow_app/utils/resource_manager/color_manager.dart'; class MenuListItem extends StatelessWidget { const MenuListItem({ super.key, - required this.listItem, + required this.title, + required this.icon, + required this.page, + required this.color, }); - final ListItemModel listItem; - + final String title; + final String icon; + final Widget? page; + final Color color; @override Widget build(BuildContext context) { - return Column( - children: [ - Row( - children: [ - Container( + return InkWell( + onTap: () { + debugPrint('clicked $title page: $page'); + if (page == null) { + return; + } + Navigator.of(context) + .push(MaterialPageRoute(builder: (context) => page!)); + }, + child: Row( + children: [ + Container( margin: const EdgeInsets.only(right: 10), height: 33, width: 33, decoration: BoxDecoration( - color: ColorsManager.primaryColor, + color: color, borderRadius: BorderRadius.circular(15), ), - child: listItem.icon != null - ? SvgPicture.asset( - listItem.icon!, - ) - : null, - ), - BodyMedium( - text: listItem.label!, - ) - ], - ), - ], + child: Center( + child: SizedBox.square( + dimension: 15, + child: SvgPicture.asset( + icon, + width: 15, + height: 15, + fit: BoxFit.contain, + ), + ), + )), + BodyMedium( + text: title, + ) + ], + ), ); } } diff --git a/lib/features/menu/view/widgets/privacy/privacy_view.dart b/lib/features/menu/view/widgets/privacy/privacy_view.dart new file mode 100644 index 0000000..4dd9340 --- /dev/null +++ b/lib/features/menu/view/widgets/privacy/privacy_view.dart @@ -0,0 +1,76 @@ +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:syncrow_app/features/shared_widgets/default_container.dart'; +import 'package:syncrow_app/features/shared_widgets/default_scaffold.dart'; +import 'package:syncrow_app/features/shared_widgets/text_widgets/body_medium.dart'; +import 'package:syncrow_app/utils/resource_manager/color_manager.dart'; + +class PrivacyView extends StatelessWidget { + const PrivacyView({super.key}); + + @override + Widget build(BuildContext context) { + return DefaultScaffold( + title: 'Privacy', + child: Column( + children: [ + DefaultContainer( + padding: const EdgeInsets.symmetric( + horizontal: 25, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + InkWell( + onTap: () {}, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + const Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + BodyMedium( + text: 'Notification Settings', + ), + Icon( + Icons.arrow_forward_ios, + color: ColorsManager.greyColor, + size: 15, + ) + ], + ), + Container( + margin: const EdgeInsets.symmetric(vertical: 15), + height: 1, + color: ColorsManager.greyColor, + ), + ], + ), + ), + InkWell( + onTap: () {}, + child: const Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + BodyMedium( + text: 'Permissions Settings', + ), + Icon( + Icons.arrow_forward_ios, + color: ColorsManager.greyColor, + size: 15, + ) + ], + ), + ), + ], + ), + ), + ], + ), + ); + } +} diff --git a/lib/features/menu/view/widgets/profile/profile_tab.dart b/lib/features/menu/view/widgets/profile/profile_tab.dart new file mode 100644 index 0000000..2d86229 --- /dev/null +++ b/lib/features/menu/view/widgets/profile/profile_tab.dart @@ -0,0 +1,63 @@ +import 'package:flutter/material.dart'; +import 'package:syncrow_app/features/menu/view/widgets/profile/profile_view.dart'; +import 'package:syncrow_app/features/shared_widgets/default_container.dart'; +import 'package:syncrow_app/features/shared_widgets/syncrow_logo.dart'; +import 'package:syncrow_app/features/shared_widgets/text_widgets/body_medium.dart'; +import 'package:syncrow_app/features/shared_widgets/text_widgets/body_small.dart'; + +class ProfileTab extends StatelessWidget { + const ProfileTab({ + super.key, + }); + + @override + Widget build(BuildContext context) { + return Padding( + padding: const EdgeInsets.symmetric(vertical: 10), + child: InkWell( + onTap: () { + Navigator.of(context).push( + MaterialPageRoute( + builder: (context) => const ProfileView(), + ), + ); + }, + child: const Stack( + children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + SizedBox(height: 20), + DefaultContainer( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + BodyMedium( + text: "Karim", + fontWeight: FontWeight.bold, + ), + BodySmall(text: "Syncrow Account") + ], + ), + ), + ], + ), + Positioned( + right: 20, + top: 0, + child: CircleAvatar( + radius: 38, + backgroundColor: Colors.white, + child: CircleAvatar( + radius: 37, + backgroundColor: Colors.grey, + child: SyncrowLogo(), + ), + ), + ), + ], + ), + ), + ); + } +} diff --git a/lib/features/menu/view/widgets/profile/profile_view.dart b/lib/features/menu/view/widgets/profile/profile_view.dart new file mode 100644 index 0000000..91a346e --- /dev/null +++ b/lib/features/menu/view/widgets/profile/profile_view.dart @@ -0,0 +1,129 @@ +import 'package:flutter/material.dart'; +import 'package:syncrow_app/features/shared_widgets/default_container.dart'; +import 'package:syncrow_app/features/shared_widgets/default_scaffold.dart'; +import 'package:syncrow_app/features/shared_widgets/text_widgets/body_medium.dart'; +import 'package:syncrow_app/features/shared_widgets/text_widgets/title_medium.dart'; +import 'package:syncrow_app/utils/context_extension.dart'; +import 'package:syncrow_app/utils/resource_manager/color_manager.dart'; + +class ProfileView extends StatelessWidget { + const ProfileView({super.key}); + + @override + Widget build(BuildContext context) { + return DefaultScaffold( + title: 'Profile Page', + child: Column( + children: [ + //profile pic + const SizedBox.square( + dimension: 120, + child: CircleAvatar( + backgroundColor: Colors.white, + child: SizedBox.square( + dimension: 115, + child: CircleAvatar( + backgroundColor: Colors.grey, + child: FlutterLogo(), + ), + ), + ), + ), + const SizedBox(height: 20), + //name + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + const TitleMedium(text: 'Karim'), + const SizedBox( + width: 5, + ), + InkWell( + onTap: () { + //TODO: Implement edit name + }, + child: const Icon( + Icons.edit_outlined, + size: 20, + color: ColorsManager.textPrimaryColor, + ), + ), + ], + ), + const SizedBox(height: 10), + //Info + DefaultContainer( + padding: const EdgeInsets.symmetric( + horizontal: 25, + vertical: 5, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + const BodyMedium(text: 'Email '), + Flexible( + child: TextField( + textAlign: TextAlign.end, + decoration: InputDecoration( + hintText: ' Test@test.com', + hintStyle: + context.bodyMedium.copyWith(color: Colors.grey), + border: InputBorder.none, + ), + ), + ), + ], + ), + Container( + height: 1, + color: ColorsManager.greyColor, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + const BodyMedium(text: 'Region '), + Flexible( + child: TextField( + textAlign: TextAlign.end, + decoration: InputDecoration( + hintText: 'United Arab Emirates', + hintStyle: + context.bodyMedium.copyWith(color: Colors.grey), + border: InputBorder.none, + ), + ), + ), + ], + ), + Container( + height: 1, + color: ColorsManager.greyColor, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + const BodyMedium(text: 'Time Zone '), + Flexible( + child: TextField( + textAlign: TextAlign.end, + decoration: InputDecoration( + hintText: 'GMT +4', + hintStyle: + context.bodyMedium.copyWith(color: Colors.grey), + border: InputBorder.none, + ), + ), + ), + ], + ), + ], + )), + ], + ), + ); + } +} diff --git a/lib/features/menu/view/widgets/profile_tab.dart b/lib/features/menu/view/widgets/profile_tab.dart deleted file mode 100644 index bfc7a16..0000000 --- a/lib/features/menu/view/widgets/profile_tab.dart +++ /dev/null @@ -1,53 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:syncrow_app/features/shared_widgets/default_container.dart'; -import 'package:syncrow_app/features/shared_widgets/syncrow_logo.dart'; -import 'package:syncrow_app/features/shared_widgets/text_widgets/body_medium.dart'; -import 'package:syncrow_app/features/shared_widgets/text_widgets/body_small.dart'; - -class ProfileTab extends StatelessWidget { - const ProfileTab({ - super.key, - }); - - @override - Widget build(BuildContext context) { - return const Padding( - padding: EdgeInsets.symmetric(vertical: 10), - child: Stack( - children: [ - Column( - crossAxisAlignment: CrossAxisAlignment.stretch, - children: [ - SizedBox(height: 20), - DefaultContainer( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - BodyMedium( - text: "Karim", - fontWeight: FontWeight.bold, - ), - BodySmall(text: "Syncrow Account") - ], - ), - ), - ], - ), - Positioned( - right: 20, - top: 0, - child: CircleAvatar( - radius: 38, - backgroundColor: Colors.white, - child: CircleAvatar( - radius: 37, - backgroundColor: Colors.grey, - child: SyncrowLogo(), - ), - ), - ), - ], - ), - ); - } -} diff --git a/lib/features/menu/view/widgets/securty/securty_view.dart b/lib/features/menu/view/widgets/securty/securty_view.dart new file mode 100644 index 0000000..65e1d94 --- /dev/null +++ b/lib/features/menu/view/widgets/securty/securty_view.dart @@ -0,0 +1,157 @@ +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:syncrow_app/features/shared_widgets/default_container.dart'; +import 'package:syncrow_app/features/shared_widgets/default_scaffold.dart'; +import 'package:syncrow_app/features/shared_widgets/text_widgets/body_medium.dart'; +import 'package:syncrow_app/utils/resource_manager/color_manager.dart'; + +class SecurtyView extends StatelessWidget { + const SecurtyView({super.key}); + + @override + Widget build(BuildContext context) { + return DefaultScaffold( + title: 'Securty', + child: Column( + children: [ + DefaultContainer( + padding: const EdgeInsets.symmetric( + horizontal: 25, + vertical: 20, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + InkWell( + onTap: () {}, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + const Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + BodyMedium( + text: 'Change Password', + ), + Icon( + Icons.arrow_forward_ios, + color: ColorsManager.greyColor, + size: 15, + ) + ], + ), + Container( + margin: const EdgeInsets.symmetric(vertical: 15), + height: 1, + color: ColorsManager.greyColor, + ), + ], + ), + ), + InkWell( + onTap: () {}, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + const Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + BodyMedium( + text: 'App Lock', + ), + Icon( + Icons.arrow_forward_ios, + color: ColorsManager.greyColor, + size: 15, + ) + ], + ), + Container( + margin: const EdgeInsets.symmetric(vertical: 15), + height: 1, + color: ColorsManager.greyColor, + ), + ], + ), + ), + InkWell( + onTap: () {}, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + const Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + BodyMedium( + text: 'User Code', + ), + Icon( + Icons.arrow_forward_ios, + color: ColorsManager.greyColor, + size: 15, + ) + ], + ), + Container( + margin: const EdgeInsets.symmetric(vertical: 15), + height: 1, + color: ColorsManager.greyColor, + ), + ], + ), + ), + InkWell( + onTap: () {}, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + const Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + BodyMedium( + text: 'Delete Account', + ), + Icon( + Icons.arrow_forward_ios, + color: ColorsManager.greyColor, + size: 15, + ) + ], + ), + Container( + margin: const EdgeInsets.symmetric(vertical: 15), + height: 1, + color: ColorsManager.greyColor, + ), + ], + ), + ), + InkWell( + onTap: () {}, + child: const Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + BodyMedium( + text: 'Device Update', + ), + Icon( + Icons.arrow_forward_ios, + color: ColorsManager.greyColor, + size: 15, + ) + ], + ), + ), + ], + ), + ), + ], + ), + ); + } +} diff --git a/lib/features/profile/bloc/profile_cubit.dart b/lib/features/profile/bloc/profile_cubit.dart deleted file mode 100644 index 015ab62..0000000 --- a/lib/features/profile/bloc/profile_cubit.dart +++ /dev/null @@ -1,7 +0,0 @@ -import 'package:flutter_bloc/flutter_bloc.dart'; - -part 'profile_state.dart'; - -class ProfileCubit extends Cubit { - ProfileCubit() : super(ProfileInitial()); -} diff --git a/lib/features/profile/bloc/profile_state.dart b/lib/features/profile/bloc/profile_state.dart deleted file mode 100644 index 1c91759..0000000 --- a/lib/features/profile/bloc/profile_state.dart +++ /dev/null @@ -1,5 +0,0 @@ -part of 'profile_cubit.dart'; - -abstract class ProfileState {} - -class ProfileInitial extends ProfileState {} diff --git a/lib/features/profile/view/profile_view.dart b/lib/features/profile/view/profile_view.dart deleted file mode 100644 index cde2cd5..0000000 --- a/lib/features/profile/view/profile_view.dart +++ /dev/null @@ -1,21 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter_bloc/flutter_bloc.dart'; -import 'package:syncrow_app/features/profile/bloc/profile_cubit.dart'; - -class ProfileView extends StatelessWidget { - const ProfileView({super.key}); - - @override - Widget build(BuildContext context) { - return BlocProvider( - create: (context) => ProfileCubit(), - child: BlocBuilder( - builder: (context, state) { - return const Center( - child: Text('Profile Page'), - ); - }, - ), - ); - } -} diff --git a/lib/features/shared_widgets/default_scaffold.dart b/lib/features/shared_widgets/default_scaffold.dart new file mode 100644 index 0000000..1a1f0df --- /dev/null +++ b/lib/features/shared_widgets/default_scaffold.dart @@ -0,0 +1,57 @@ +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:syncrow_app/features/shared_widgets/text_widgets/body_large.dart'; +import 'package:syncrow_app/generated/assets.dart'; +import 'package:syncrow_app/utils/resource_manager/color_manager.dart'; +import 'package:syncrow_app/utils/resource_manager/constants.dart'; +import 'package:syncrow_app/utils/resource_manager/font_manager.dart'; + +class DefaultScaffold extends StatelessWidget { + const DefaultScaffold( + {super.key, required this.child, this.title, this.actions}); + + final Widget child; + final String? title; + final List? actions; + @override + Widget build(BuildContext context) { + return AnnotatedRegion( + value: SystemUiOverlayStyle( + statusBarColor: ColorsManager.primaryColor.withOpacity(0.5), + statusBarIconBrightness: Brightness.dark, // For Android (dark icons) + statusBarBrightness: Brightness.dark, // For iOS (dark icons) + ), + child: Scaffold( + backgroundColor: ColorsManager.backgroundColor, + extendBodyBehindAppBar: true, + extendBody: true, + appBar: AppBar( + backgroundColor: Colors.transparent, + centerTitle: true, + title: BodyLarge( + text: title ?? "", + fontColor: ColorsManager.primaryColor, + fontWeight: FontsManager.bold, + ), + actions: actions, + ), + body: Container( + width: MediaQuery.sizeOf(context).width, + height: MediaQuery.sizeOf(context).height, + padding: const EdgeInsets.all(Constants.defaultPadding), + decoration: const BoxDecoration( + image: DecorationImage( + image: AssetImage( + Assets.imagesBackground, + ), + fit: BoxFit.cover, + opacity: 0.4, + ), + ), + child: SafeArea(child: child), + ), + ), + ); + } +} diff --git a/lib/generated/assets.dart b/lib/generated/assets.dart index f272133..5d12d79 100644 --- a/lib/generated/assets.dart +++ b/lib/generated/assets.dart @@ -84,6 +84,24 @@ class Assets { static const String doorlockAssetsUnlockingRecords = 'assets/icons/doorlock-assets/unlocking-records.svg'; static const String fontsAftikaRegular = 'assets/fonts/AftikaRegular.ttf'; + static const String generalSettingsIconsClearCache = + 'assets/icons/MenuIcons/GeneralSettingsIcons/clearCach.svg'; + static const String generalSettingsIconsLanguage = + 'assets/icons/MenuIcons/GeneralSettingsIcons/language.svg'; + static const String generalSettingsIconsNetworkDiagnosis = + 'assets/icons/MenuIcons/GeneralSettingsIcons/networkDiagnosis.svg'; + static const String generalSettingsIconsTemperatureUnit = + 'assets/icons/MenuIcons/GeneralSettingsIcons/temperatureUnit.svg'; + static const String generalSettingsIconsTouchTone = + 'assets/icons/MenuIcons/GeneralSettingsIcons/touchTone.svg'; + static const String generalSettingsIconsVoiceAssistant = + 'assets/icons/MenuIcons/GeneralSettingsIcons/voiceAssistant.svg'; + static const String homeManagementIconsCreateHome = + 'assets/icons/MenuIcons/HomeManagementIcons/CreateHome.svg'; + static const String homeManagementIconsJoinAHome = + 'assets/icons/MenuIcons/HomeManagementIcons/joinAHome.svg'; + static const String homeManagementIconsManageYourHome = + 'assets/icons/MenuIcons/HomeManagementIcons/ManageYourHome.svg'; static const String icons3GangSwitch = 'assets/icons/3GangSwitch.svg'; static const String iconsAC = 'assets/icons/AC.svg'; static const String iconsActive = 'assets/icons/active.svg'; @@ -158,31 +176,46 @@ class Assets { static const String imagesTestDash2 = 'assets/images/test_dash2.png'; static const String imagesVector = 'assets/images/Vector.png'; static const String imagesWhiteLogo = 'assets/images/white-logo.png'; - + static const String leagalInfoIconsAbout = + 'assets/icons/MenuIcons/LeagalInfoIcons/About.svg'; + static const String leagalInfoIconsPrivacyPolicy = + 'assets/icons/MenuIcons/LeagalInfoIcons/PrivacyPolicy.svg'; + static const String leagalInfoIconsUserAgreement = + 'assets/icons/MenuIcons/LeagalInfoIcons/UserAgreement.svg'; + static const String messagesCenterIconsAlerts = + 'assets/icons/MenuIcons/MessagesCenterIcons/Alerts.svg'; + static const String messagesCenterIconsFAQs = + 'assets/icons/MenuIcons/MessagesCenterIcons/FAQs.svg'; + static const String messagesCenterIconsHelpAndFeedbacks = + 'assets/icons/MenuIcons/MessagesCenterIcons/HelpAndFeedback.svg'; + static const String messagesCenterIconsMessages = + 'assets/icons/MenuIcons/MessagesCenterIcons/Messages.svg'; static const String presenceSensorAssetsDistance = 'assets/icons/presence-sensor-assets/Distance.svg'; static const String presenceSensorAssetsEmpty = 'assets/icons/presence-sensor-assets/Empty.svg'; + static const String presenceSensorAssetsHelpDescription = + 'assets/icons/presence-sensor-assets/help-description.svg'; static const String presenceSensorAssetsIlluminanceRecord = 'assets/icons/presence-sensor-assets/Illuminance-Record.svg'; static const String presenceSensorAssetsIlluminanceValue = 'assets/icons/presence-sensor-assets/Illuminance-Value.svg'; static const String presenceSensorAssetsIndicator = 'assets/icons/presence-sensor-assets/Indicator.svg'; - static const String presenceSensorAssetsPresence = - 'assets/icons/presence-sensor-assets/Presence.svg'; - static const String presenceSensorAssetsRecord = - 'assets/icons/presence-sensor-assets/Record.svg'; - static const String presenceSensorAssetsTime = - 'assets/icons/presence-sensor-assets/Time.svg'; - - static const String presenceSensorAssetsHelpDescription = - 'assets/icons/presence-sensor-assets/help-description.svg'; static const String presenceSensorAssetsInductionRecording = 'assets/icons/presence-sensor-assets/induction-recording.svg'; static const String presenceSensorAssetsParameterSettings = 'assets/icons/presence-sensor-assets/parameter-settings.svg'; + static const String presenceSensorAssetsPresence = + 'assets/icons/presence-sensor-assets/Presence.svg'; static const String presenceSensorAssetsPresenceSensorMotion = 'assets/icons/presence-sensor-assets/presence-sensor-motion.svg'; - + static const String presenceSensorAssetsRecord = + 'assets/icons/presence-sensor-assets/Record.svg'; + static const String presenceSensorAssetsTime = + 'assets/icons/presence-sensor-assets/Time.svg'; + static const String securityAndPrivacyIconsPrivacy = + 'assets/icons/MenuIcons/SecurityAndPrivacyIcons/Privacy.svg'; + static const String securityAndPrivacyIconsSecurty = + 'assets/icons/MenuIcons/SecurityAndPrivacyIcons/Securty.svg'; } diff --git a/lib/navigation/router.dart b/lib/navigation/router.dart index 4b84208..c2b1382 100644 --- a/lib/navigation/router.dart +++ b/lib/navigation/router.dart @@ -9,7 +9,7 @@ import 'package:syncrow_app/features/auth/view/widgets/user_agreement/user_agree import 'package:syncrow_app/features/dashboard/view/dashboard_view.dart'; import 'package:syncrow_app/features/layout/view/layout_view.dart'; import 'package:syncrow_app/features/menu/view/menu_view.dart'; -import 'package:syncrow_app/features/profile/view/profile_view.dart'; +import 'package:syncrow_app/features/menu/view/widgets/profile/profile_view.dart'; import 'package:syncrow_app/features/scene/view/scene_view.dart'; import 'package:syncrow_app/features/splash/view/splash_view.dart'; diff --git a/pubspec.yaml b/pubspec.yaml index f2a02a4..472e4bc 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -54,6 +54,11 @@ flutter: - assets/icons/presence-sensor-assets/ - assets/icons/battery/dmOff/ - assets/icons/battery/dmOn/ + - assets/icons/MenuIcons/GeneralSettingsIcons/ + - assets/icons/MenuIcons/HomeManagementIcons/ + - assets/icons/MenuIcons/LeagalInfoIcons/ + - assets/icons/MenuIcons/MessagesCenterIcons/ + - assets/icons/MenuIcons/SecurityAndPrivacyIcons/ fonts: - family: Aftika