feat(chat): More layoouts

This commit is contained in:
2024-05-03 16:36:44 +03:00
parent 6869287c85
commit 6576ce4bc4
2 changed files with 49 additions and 55 deletions

View File

@@ -1,8 +1,13 @@
/*import 'bloc/chat_bloc.dart';
import 'bloc/chat_bloc.dart';
import 'models/chat_model.dart';
import 'package:eatvio_app/core/app_export.dart';
import 'package:flutter/material.dart';
import 'package:eatvio_app/widgets/app_bar/custom_app_bar.dart';
import 'package:eatvio_app/widgets/app_bar/appbar_subtitle.dart';
import 'package:eatvio_app/widgets/app_bar/appbar_leading_image.dart';
import 'package:eatvio_app/widgets/app_bar/appbar_title_image.dart';
import 'package:eatvio_app/widgets/custom_bottom_bar.dart';
import 'package:eatvio_app/widgets/custom_text_form_field.dart';
class ChatScreen extends StatelessWidget {
const ChatScreen({Key? key}) : super(key: key);
@@ -37,7 +42,7 @@ class ChatScreen extends StatelessWidget {
alignment: Alignment.bottomRight,
children: [
CustomImageView(
imagePath: ImageConstant.imgPath,
imagePath: ImageConstant.imageNotFound,
height: 34.v,
width: 211.h,
alignment: Alignment.center,
@@ -72,8 +77,7 @@ class ChatScreen extends StatelessWidget {
),
),
CustomImageView(
imagePath:
ImageConstant.imgCheckmarkBlueA400,
imagePath: ImageConstant.imageNotFound,
height: 7.v,
width: 14.h,
margin: EdgeInsets.only(
@@ -97,7 +101,7 @@ class ChatScreen extends StatelessWidget {
),
child: _buildColumncheckmark(
context,
imageOne: ImageConstant.imgRectangle,
imageOne: ImageConstant.imageNotFound,
time: "lbl_10_15".tr,
),
),
@@ -109,7 +113,7 @@ class ChatScreen extends StatelessWidget {
),
child: _buildColumncheckmark(
context,
imageOne: ImageConstant.imgRectangle186x254,
imageOne: ImageConstant.imageNotFound,
time: "lbl_10_15".tr,
),
),
@@ -127,9 +131,7 @@ class ChatScreen extends StatelessWidget {
),
decoration: BoxDecoration(
image: DecorationImage(
image: fs.Svg(
ImageConstant.imgGroup14,
),
image: AssetImage(ImageConstant.imageNotFound),
fit: BoxFit.cover,
),
),
@@ -158,8 +160,8 @@ class ChatScreen extends StatelessWidget {
children: [
Text(
"lbl_martha_craig".tr,
style: CustomTextStyles
.bodyMediumLightblueA70001,
style:
CustomTextStyles.titleSmallBold,
),
Text(
"lbl_good_morning".tr,
@@ -188,8 +190,8 @@ class ChatScreen extends StatelessWidget {
),
child: Text(
"lbl_11_40".tr,
style: CustomTextStyles
.bodySmallBluegray40001,
style:
CustomTextStyles.bodyMediumBlack900,
),
)
],
@@ -208,7 +210,7 @@ class ChatScreen extends StatelessWidget {
alignment: Alignment.topCenter,
children: [
CustomImageView(
imagePath: ImageConstant.imgPathGray50,
imagePath: ImageConstant.imageNotFound,
height: 34.v,
width: 266.h,
alignment: Alignment.center,
@@ -249,8 +251,7 @@ class ChatScreen extends StatelessWidget {
),
),
CustomImageView(
imagePath:
ImageConstant.imgCheckmarkBlueA400,
imagePath: ImageConstant.imageNotFound,
height: 7.v,
width: 14.h,
margin: EdgeInsets.only(
@@ -281,9 +282,7 @@ class ChatScreen extends StatelessWidget {
),
decoration: BoxDecoration(
image: DecorationImage(
image: fs.Svg(
ImageConstant.imgGroup76,
),
image: AssetImage(ImageConstant.imageNotFound),
fit: BoxFit.cover,
),
),
@@ -312,7 +311,8 @@ class ChatScreen extends StatelessWidget {
),
child: Text(
"lbl_11_45".tr,
style: CustomTextStyles.bodySmallBluegray40001,
style:
CustomTextStyles.bodySmallMulishBluegray800,
),
)
],
@@ -330,7 +330,7 @@ class ChatScreen extends StatelessWidget {
alignment: Alignment.bottomCenter,
children: [
CustomImageView(
imagePath: ImageConstant.imgGroup14,
imagePath: ImageConstant.imageNotFound,
height: 34.v,
width: 178.h,
alignment: Alignment.center,
@@ -358,7 +358,7 @@ class ChatScreen extends StatelessWidget {
child: Text(
"lbl_11_45".tr,
style: CustomTextStyles
.bodySmallBluegray40001,
.bodySmallMulishBluegray800,
),
)
],
@@ -378,7 +378,7 @@ class ChatScreen extends StatelessWidget {
alignment: Alignment.bottomCenter,
children: [
CustomImageView(
imagePath: ImageConstant.imgPath,
imagePath: ImageConstant.imageNotFound,
height: 34.v,
width: 218.h,
alignment: Alignment.center,
@@ -406,8 +406,7 @@ class ChatScreen extends StatelessWidget {
),
),
CustomImageView(
imagePath:
ImageConstant.imgCheckmarkBlueA400,
imagePath: ImageConstant.imageNotFound,
height: 7.v,
width: 14.h,
margin: EdgeInsets.only(
@@ -436,9 +435,7 @@ class ChatScreen extends StatelessWidget {
),
decoration: BoxDecoration(
image: DecorationImage(
image: fs.Svg(
ImageConstant.imgGroup11,
),
image: AssetImage(ImageConstant.imageNotFound),
fit: BoxFit.cover,
),
),
@@ -452,7 +449,7 @@ class ChatScreen extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
CustomImageView(
imagePath: ImageConstant.imgDownload,
imagePath: ImageConstant.imageNotFound,
height: 40.adaptSize,
width: 40.adaptSize,
margin: EdgeInsets.only(bottom: 2.v),
@@ -468,13 +465,13 @@ class ChatScreen extends StatelessWidget {
children: [
Text(
"lbl7".tr,
style:
CustomTextStyles.bodyLargeBlueA400,
style: CustomTextStyles
.bodyMediumBluegray800,
),
Text(
"lbl_2_8_mb".tr,
style:
CustomTextStyles.bodyMediumBlueA400,
style: CustomTextStyles
.bodyMediumBluegray800,
)
],
),
@@ -502,8 +499,9 @@ class ChatScreen extends StatelessWidget {
bottomNavigationBar: _buildBottomBar(context),
);
}
/// Section Widget
_buildAppbar(BuildContext context) {
/// Section Widget
_buildAppbar(BuildContext context) {
return CustomAppBar(
leadingWidth: 26.h,
leading: AppbarLeadingImage(
@@ -521,8 +519,8 @@ class ChatScreen extends StatelessWidget {
padding: EdgeInsets.only(left: 12.h),
child: Row(
children: [
AppbarTitleCircleimage(
imagePath: ImageConstant.imgOval40x40,
AppbarTitleImage(
imagePath: ImageConstant.imgIconMoreHorizontal,
margin: EdgeInsets.only(bottom: 3.v),
),
Padding(
@@ -532,7 +530,7 @@ class ChatScreen extends StatelessWidget {
),
child: Column(
children: [
AppbarTitle(
AppbarSubtitle(
text: "lbl2".tr,
),
SizedBox(height: 3.v),
@@ -546,7 +544,6 @@ class ChatScreen extends StatelessWidget {
],
),
),
styleType: Style.bgFill,
);
}
@@ -558,13 +555,13 @@ class ChatScreen extends StatelessWidget {
horizontal: 7.h,
vertical: 6.v,
),
decoration: AppDecoration.outlineGray,
decoration: AppDecoration.outlineBlueGray,
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
CustomImageView(
imagePath: ImageConstant.imgAttach,
imagePath: ImageConstant.imageNotFound,
height: 29.adaptSize,
width: 29.adaptSize,
margin: EdgeInsets.only(
@@ -579,7 +576,7 @@ class ChatScreen extends StatelessWidget {
bottom: 4.v,
),
child: BlocSelector<ChatBloc, ChatState, TextEditingController?>(
selector: (state) => state.messageController,
selector: (state) => TextEditingController(),
builder: (context, messageController) {
return CustomTextFormField(
controller: messageController,
@@ -591,7 +588,7 @@ class ChatScreen extends StatelessWidget {
),
),
CustomImageView(
imagePath: ImageConstant.imgMenu,
imagePath: ImageConstant.imageNotFound,
height: 24.v,
width: 18.h,
margin: EdgeInsets.only(
@@ -620,9 +617,7 @@ class ChatScreen extends StatelessWidget {
padding: EdgeInsets.all(9.h),
decoration: BoxDecoration(
image: DecorationImage(
image: fs.Svg(
ImageConstant.imgGroup11,
),
image: AssetImage(ImageConstant.imageNotFound),
fit: BoxFit.cover,
),
),
@@ -650,7 +645,7 @@ class ChatScreen extends StatelessWidget {
),
),
CustomImageView(
imagePath: ImageConstant.imgCheckmarkBlueA400,
imagePath: ImageConstant.imageNotFound,
height: 7.v,
width: 14.h,
margin: EdgeInsets.only(
@@ -681,7 +676,7 @@ class ChatScreen extends StatelessWidget {
),
),
CustomImageView(
imagePath: ImageConstant.imgCheckmarkBlueA400,
imagePath: ImageConstant.imageNotFound,
height: 7.v,
width: 14.h,
margin: EdgeInsets.only(
@@ -698,7 +693,7 @@ class ChatScreen extends StatelessWidget {
String getCurrentRoute(BottomBarEnum type) {
switch (type) {
case BottomBarEnum.tf:
return AppRoutes.k1Page;
return AppRoutes.chatScreen;
default:
return "/";
}
@@ -710,10 +705,10 @@ class ChatScreen extends StatelessWidget {
String currentRoute,
) {
switch (currentRoute) {
case AppRoutes.k1Page:
return K1Page.builder(context);
case AppRoutes.chatScreen:
return ChatScreen.builder(context);
default:
return DefaultWidget();
return ChatScreen();
}
}
@@ -722,4 +717,3 @@ class ChatScreen extends StatelessWidget {
NavigatorService.goBack();
}
}
*/

View File

@@ -20,7 +20,7 @@ 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_screen/chat_screen.dart';
import 'package:eatvio_app/presentation/chat/chat_select_screen/chat_select_screen.dart';
class AppRoutes {
@@ -101,7 +101,7 @@ class AppRoutes {
myProfile: MyProfileScreen.builder,
mySettings: MySettingsScreen.builder,
diaryEdit: DiaryEditScreen.builder,
//chatScreen: ChatScreen.builder,
chatScreen: ChatScreen.builder,
chatSelectScreen: ChatSelectScreen.builder,
};
}