diff --git a/lib/presentation/chat/chat_select_screen/chat_select_screen.dart b/lib/presentation/chat/chat_select_screen/chat_select_screen.dart index 1959b70c..38569ceb 100644 --- a/lib/presentation/chat/chat_select_screen/chat_select_screen.dart +++ b/lib/presentation/chat/chat_select_screen/chat_select_screen.dart @@ -16,6 +16,69 @@ class ChatSelectScreen extends StatelessWidget { @override Widget build(BuildContext context) { mediaQueryData = MediaQuery.of(context); - return Container(); + return SafeArea( + child: Scaffold( + resizeToAvoidBottomInset: false, + body: Container( + width: double.maxFinite, + decoration: AppDecoration.fillGray, + child: Column( + children: [ + SizedBox(height: 30.v), + Container( + margin: EdgeInsets.only( + left: 16.h, + right: 20.h, + ), + padding: EdgeInsets.all(12.h), + decoration: AppDecoration.outlinePrimary.copyWith( + borderRadius: BorderRadiusStyle.circleBorder8, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + BlocSelector( + selector: (state) => TextEditingController(), + builder: (context, searchController) { + return Container(); + }, + ), + SizedBox(height: 20.v), + _buildUserprofile(context) + ], + ), + ) + ], + ), + ), + ), + ); + } + + Widget _buildUserprofile(BuildContext context) { + return BlocSelector( + selector: (state) => state.chatSelectModelObj, + builder: (context, k1ModelObj) { + return ListView.separated( + physics: NeverScrollableScrollPhysics(), + shrinkWrap: true, + separatorBuilder: (context, index) { + return SizedBox( + height: 10.v, + ); + }, + itemCount: k1ModelObj?.userprofileItemList.length ?? 0, + itemBuilder: (context, index) { + UserprofileItemModel model = + k1ModelObj?.userprofileItemList[index] ?? + UserprofileItemModel(); + return UserprofileItemWidget( + model, + ); + }, + ); + }, + ); } } diff --git a/lib/routes/app_routes.dart b/lib/routes/app_routes.dart index c754e47b..97311c58 100644 --- a/lib/routes/app_routes.dart +++ b/lib/routes/app_routes.dart @@ -20,6 +20,8 @@ import 'package:eatvio_app/presentation/auth/auth_screen/auth_screen.dart'; import 'package:eatvio_app/presentation/profile/my_profile_screen/my_profile_screen.dart'; import 'package:eatvio_app/presentation/profile/my_profile_screen/my_settings_screen.dart'; import 'package:eatvio_app/presentation/diary/diary_edit_screen/diary_edit_screen.dart'; +import 'package:eatvio_app/presentation/chat/chat_screen/chat_screen.dart'; +import 'package:eatvio_app/presentation/chat/chat_select_screen/chat_select_screen.dart'; class AppRoutes { // REGISTRATION @@ -72,6 +74,10 @@ class AppRoutes { static const String diaryEdit = '/diaryEdit'; + static const String chatScreen = '/chat'; + + static const String chatSelectScreen = '/chatSelect'; + static Map get routes => { dateOfBirthScreen: DateOfBirthScreen.builder, cityOfLivingScreen: CityOfLivingScreen.builder, @@ -95,5 +101,7 @@ class AppRoutes { myProfile: MyProfileScreen.builder, mySettings: MySettingsScreen.builder, diaryEdit: DiaryEditScreen.builder, + chatScreen: ChatScreen.builder, + chatSelectScreen: ChatSelectScreen.builder, }; } diff --git a/lib/widgets/custom_bottom_bar.dart b/lib/widgets/custom_bottom_bar.dart index 922964b0..6968a085 100644 --- a/lib/widgets/custom_bottom_bar.dart +++ b/lib/widgets/custom_bottom_bar.dart @@ -92,7 +92,7 @@ class CustomBottomBarState extends State { Navigator.pushNamed(context, AppRoutes.diaryEdit); break; case 3: - Navigator.pushNamed(context, '/chat'); + Navigator.pushNamed(context, AppRoutes.chatSelectScreen); break; } }