mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2026-10-24 14:37:56 +00:00
Merge branch 'dev' into finishing_smart_door_pages
This commit is contained in:
@@ -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<MenuState> {
|
||||
|
||||
static MenuCubit of(context) => BlocProvider.of<MenuCubit>(context);
|
||||
|
||||
List<MenuListModel> 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<MenuListModel> 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',
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// ];
|
||||
}
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
class ListItemModel {
|
||||
final String? icon;
|
||||
final String? label;
|
||||
|
||||
ListItemModel({
|
||||
this.icon,
|
||||
this.label,
|
||||
});
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
import 'list_item_model.dart';
|
||||
|
||||
class MenuListModel {
|
||||
final String? label;
|
||||
final List<ListItemModel?>? listItems;
|
||||
|
||||
MenuListModel({
|
||||
this.label,
|
||||
this.listItems,
|
||||
});
|
||||
}
|
||||
@@ -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<Map<String, Object>> 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
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
@@ -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,
|
||||
),
|
||||
],
|
||||
))
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -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,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -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,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -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,
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
));
|
||||
}
|
||||
}
|
||||
@@ -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<String, dynamic> 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()),
|
||||
|
||||
@@ -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,
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -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(),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -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: ' [email protected]',
|
||||
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,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
)),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -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(),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -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,
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
|
||||
part 'profile_state.dart';
|
||||
|
||||
class ProfileCubit extends Cubit<ProfileState> {
|
||||
ProfileCubit() : super(ProfileInitial());
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
part of 'profile_cubit.dart';
|
||||
|
||||
abstract class ProfileState {}
|
||||
|
||||
class ProfileInitial extends ProfileState {}
|
||||
@@ -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<ProfileCubit, ProfileState>(
|
||||
builder: (context, state) {
|
||||
return const Center(
|
||||
child: Text('Profile Page'),
|
||||
);
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
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';
|
||||
|
||||
Reference in New Issue
Block a user