diff --git a/lib/features/menu/view/menu_view.dart b/lib/features/menu/view/menu_view.dart index cb05a94..97af28e 100644 --- a/lib/features/menu/view/menu_view.dart +++ b/lib/features/menu/view/menu_view.dart @@ -3,7 +3,7 @@ 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/menu_list.dart'; -import 'package:syncrow_app/features/menu/view/widgets/profile_tab.dart'; +import 'package:syncrow_app/features/menu/view/widgets/profile/profile_tab.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'; diff --git a/lib/features/menu/view/widgets/menu_list.dart b/lib/features/menu/view/widgets/menu_list.dart index 74391c5..511f476 100644 --- a/lib/features/menu/view/widgets/menu_list.dart +++ b/lib/features/menu/view/widgets/menu_list.dart @@ -1,10 +1,8 @@ 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'; import 'package:syncrow_app/features/shared_widgets/text_widgets/body_small.dart'; -import 'package:syncrow_app/generated/assets.dart'; class MenuList extends StatelessWidget { const MenuList({ diff --git a/lib/features/menu/view/widgets/menu_list_item.dart b/lib/features/menu/view/widgets/menu_list_item.dart index fdb64ea..264e2b8 100644 --- a/lib/features/menu/view/widgets/menu_list_item.dart +++ b/lib/features/menu/view/widgets/menu_list_item.dart @@ -1,7 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.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({ 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/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'), - ); - }, - ), - ); - } -}