Hide nonfunctional widgets

This commit is contained in:
Abdullah Alassaf
2024-12-15 02:22:11 +03:00
parent fc3f215dba
commit f81880a704
12 changed files with 735 additions and 920 deletions

View File

@ -80,30 +80,30 @@ class HomeSettingsView extends StatelessWidget {
),
),
//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,
),
),
),
],
),
// 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,
// ),
// ),
// ),
// ],
// ),
//Divider
Container(
margin: const EdgeInsets.only(bottom: 10),
margin: const EdgeInsets.symmetric(vertical: 10),
height: 1,
color: ColorsManager.greyColor,
),
@ -135,77 +135,77 @@ class HomeSettingsView extends StatelessWidget {
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: 2,
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,
),
),
),
),
),
],
),
)
// const BodySmall(
// text: "Members",
// fontWeight: FontWeight.bold,
// ),
// GridView.builder(
// shrinkWrap: true,
// gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
// crossAxisCount: 2,
// crossAxisSpacing: 10,
// ),
// itemCount: 2,
// 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,
// ),
// ),
// ),
// ),
// ),
// ],
// ),
// )
],
),
);

View File

@ -4,8 +4,8 @@ import 'package:syncrow_app/features/app_layout/bloc/home_cubit.dart';
import 'package:syncrow_app/features/menu/bloc/profile_bloc/profile_bloc.dart';
import 'package:syncrow_app/features/menu/bloc/profile_bloc/profile_event.dart';
import 'package:syncrow_app/features/menu/bloc/profile_bloc/profile_state.dart';
import 'package:syncrow_app/features/menu/view/widgets/profile/region_page.dart';
import 'package:syncrow_app/features/menu/view/widgets/profile/time_zone_screen_page.dart';
// import 'package:syncrow_app/features/menu/view/widgets/profile/region_page.dart';
// import 'package:syncrow_app/features/menu/view/widgets/profile/time_zone_screen_page.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';
@ -134,65 +134,65 @@ class ProfileView extends StatelessWidget {
],
),
),
Container(
height: 1,
color: ColorsManager.greyColor,
),
InkWell(
onTap: () {
profileBloc.add(const ChangeNameEvent(value: false));
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => const RegionPage(),
),
).then((result) {
profileBloc.add(InitialProfileEvent());
});
},
child: Padding(
padding: const EdgeInsets.only(top: 20, bottom: 20),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
const BodyMedium(text: 'Region '),
Flexible(
child: BodyMedium(
text: HomeCubit.user!.regionName ?? 'No Region')),
],
),
),
),
Container(
height: 1,
color: ColorsManager.greyColor,
),
InkWell(
onTap: () {
profileBloc.add(const ChangeNameEvent(value: false));
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => const TimeZoneScreenPage(),
),
).then((result) {
profileBloc.add(InitialProfileEvent());
});
},
child: Padding(
padding: const EdgeInsets.only(top: 15, bottom: 15),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
const BodyMedium(text: 'Time Zone '),
Flexible(
child: BodyMedium(
text: HomeCubit.user!.timeZone ?? "No Time Zone"),
),
],
),
),
),
// Container(
// height: 1,
// color: ColorsManager.greyColor,
// ),
// InkWell(
// onTap: () {
// profileBloc.add(const ChangeNameEvent(value: false));
// Navigator.push(
// context,
// MaterialPageRoute(
// builder: (context) => const RegionPage(),
// ),
// ).then((result) {
// profileBloc.add(InitialProfileEvent());
// });
// },
// child: Padding(
// padding: const EdgeInsets.only(top: 20, bottom: 20),
// child: Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
// children: [
// const BodyMedium(text: 'Region '),
// Flexible(
// child: BodyMedium(
// text: HomeCubit.user!.regionName ?? 'No Region')),
// ],
// ),
// ),
// ),
// Container(
// height: 1,
// color: ColorsManager.greyColor,
// ),
// InkWell(
// onTap: () {
// profileBloc.add(const ChangeNameEvent(value: false));
// Navigator.push(
// context,
// MaterialPageRoute(
// builder: (context) => const TimeZoneScreenPage(),
// ),
// ).then((result) {
// profileBloc.add(InitialProfileEvent());
// });
// },
// child: Padding(
// padding: const EdgeInsets.only(top: 15, bottom: 15),
// child: Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
// children: [
// const BodyMedium(text: 'Time Zone '),
// Flexible(
// child: BodyMedium(
// text: HomeCubit.user!.timeZone ?? "No Time Zone"),
// ),
// ],
// ),
// ),
// ),
],
)),
],

View File

@ -10,7 +10,7 @@ class SecurtyView extends StatelessWidget {
@override
Widget build(BuildContext context) {
return DefaultScaffold(
title: 'Securty',
title: 'Security',
child: Column(
children: [
DefaultContainer(
@ -24,11 +24,11 @@ class SecurtyView extends StatelessWidget {
children: [
InkWell(
onTap: () {},
child: Column(
child: const Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
const Row(
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
BodyMedium(
@ -41,111 +41,111 @@ class SecurtyView extends StatelessWidget {
)
],
),
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,
)
// 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,
// )
// ],
// ),
// ),
],
),
),