Initial Layouts for chat select screen

This commit is contained in:
2024-04-19 15:56:58 +03:00
parent 88f800a630
commit 8c93d57492
3 changed files with 73 additions and 2 deletions

View File

@@ -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<ChatSelectBloc, ChatSelectState,
TextEditingController?>(
selector: (state) => TextEditingController(),
builder: (context, searchController) {
return Container();
},
),
SizedBox(height: 20.v),
_buildUserprofile(context)
],
),
)
],
),
),
),
);
}
Widget _buildUserprofile(BuildContext context) {
return BlocSelector<ChatSelectBloc, ChatSelectState, ChatSelectModel?>(
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,
);
},
);
},
);
}
}

View File

@@ -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<String, WidgetBuilder> 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,
};
}

View File

@@ -92,7 +92,7 @@ class CustomBottomBarState extends State<CustomBottomBar> {
Navigator.pushNamed(context, AppRoutes.diaryEdit);
break;
case 3:
Navigator.pushNamed(context, '/chat');
Navigator.pushNamed(context, AppRoutes.chatSelectScreen);
break;
}
}