forked from eatvio/eatvio_app
Lanscape orientation and more chat layouts
This commit is contained in:
3
assets/images/img_attach.svg
Normal file
3
assets/images/img_attach.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg width="31" height="30" viewBox="0 0 31 30" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M22.835 17.4827L17.3021 23.0156C14.6506 25.6671 10.3517 25.6671 7.70014 23.0156C5.04863 20.3641 5.04863 16.0651 7.70014 13.4136L15.1478 5.96595C16.9168 4.19693 19.785 4.19693 21.554 5.96595C23.323 7.73497 23.323 10.6031 21.554 12.3721L13.8717 20.0544C13.0406 20.8856 11.693 20.8856 10.8618 20.0544C10.0307 19.2233 10.0307 17.8757 10.8618 17.0446L16.6293 11.2771C16.9222 10.9842 16.9222 10.5093 16.6293 10.2164C16.3364 9.92353 15.8616 9.92353 15.5687 10.2164L9.80119 15.9839C8.38425 17.4009 8.38425 19.6982 9.80119 21.1151C11.2181 22.532 13.5154 22.532 14.9324 21.1151L22.6147 13.4328C24.9695 11.078 24.9695 7.2601 22.6147 4.90529C20.2598 2.55048 16.442 2.55048 14.0871 4.90529L6.63948 12.3529C3.40218 15.5902 3.40218 20.8389 6.63948 24.0762C9.87678 27.3135 15.1255 27.3135 18.3628 24.0762L23.8956 18.5434C24.1885 18.2505 24.1885 17.7756 23.8956 17.4827C23.6027 17.1898 23.1279 17.1898 22.835 17.4827Z" fill="#858E99"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.0 KiB |
3
assets/images/img_mic.svg
Normal file
3
assets/images/img_mic.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg width="19" height="25" viewBox="0 0 19 25" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M9.5 0C12.2614 0 14.5 2.23858 14.5 5V12C14.5 14.7614 12.2614 17 9.5 17C6.73858 17 4.5 14.7614 4.5 12V5C4.5 2.23858 6.73858 0 9.5 0ZM18 11.25C18.4142 11.25 18.75 11.5858 18.75 12C18.75 16.6029 15.0002 20.3603 10.2509 20.7216L10.25 24C10.25 24.4142 9.91421 24.75 9.5 24.75C9.1203 24.75 8.80651 24.4678 8.75685 24.1018L8.75 24L8.75008 20.7216C4.00034 20.3609 0.25 16.6032 0.25 12C0.25 11.5858 0.585786 11.25 1 11.25C1.41421 11.25 1.75 11.5858 1.75 12C1.75 15.9936 5.20997 19.25 9.5 19.25C13.79 19.25 17.25 15.9936 17.25 12C17.25 11.5858 17.5858 11.25 18 11.25ZM6 5C6 3.067 7.567 1.5 9.5 1.5C11.433 1.5 13 3.067 13 5V12C13 13.933 11.433 15.5 9.5 15.5C7.567 15.5 6 13.933 6 12V5Z" fill="#858E99"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 845 B |
@@ -104,6 +104,10 @@ class ImageConstant {
|
||||
|
||||
static String imgSupport = '$imagePath/img_nav_support.svg';
|
||||
|
||||
static String imgMic = '$imagePath/img_mic.svg';
|
||||
|
||||
static String imgAttach = '$imagePath/img_attach.svg';
|
||||
|
||||
static String imgExit = '$imagePath/img_nav_exit.svg';
|
||||
|
||||
//-------------------------------------------------------------
|
||||
|
||||
@@ -14,6 +14,8 @@ void main() async {
|
||||
await dotenv.load(fileName: ".env");
|
||||
await Hive.initFlutter(path);
|
||||
SystemChrome.setPreferredOrientations([
|
||||
DeviceOrientation.landscapeLeft,
|
||||
DeviceOrientation.landscapeRight,
|
||||
DeviceOrientation.portraitUp,
|
||||
]);
|
||||
await PrefUtils().init();
|
||||
|
||||
@@ -26,477 +26,17 @@ class ChatScreen extends StatelessWidget {
|
||||
appBar: _buildAppbar(context),
|
||||
body: SizedBox(
|
||||
width: double.maxFinite,
|
||||
child: Column(
|
||||
children: [
|
||||
SizedBox(height: 13.v),
|
||||
Expanded(
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: [
|
||||
Container(
|
||||
height: 34.v,
|
||||
width: 211.h,
|
||||
margin: EdgeInsets.only(right: 17.h),
|
||||
child: Stack(
|
||||
alignment: Alignment.bottomRight,
|
||||
children: [
|
||||
CustomImageView(
|
||||
imagePath: ImageConstant.imageNotFound,
|
||||
height: 34.v,
|
||||
width: 211.h,
|
||||
alignment: Alignment.center,
|
||||
),
|
||||
Align(
|
||||
alignment: Alignment.bottomRight,
|
||||
child: Padding(
|
||||
padding: EdgeInsets.only(
|
||||
right: 9.h,
|
||||
bottom: 4.v,
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(bottom: 1.v),
|
||||
child: Text(
|
||||
"msg_food_is_amazing".tr,
|
||||
style: theme.textTheme.bodyLarge,
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(
|
||||
left: 7.h,
|
||||
top: 7.v,
|
||||
),
|
||||
child: Text(
|
||||
"lbl_10_10".tr,
|
||||
style: theme.textTheme.bodySmall,
|
||||
),
|
||||
),
|
||||
CustomImageView(
|
||||
imagePath: ImageConstant.imageNotFound,
|
||||
height: 7.v,
|
||||
width: 14.h,
|
||||
margin: EdgeInsets.only(
|
||||
left: 2.h,
|
||||
top: 9.v,
|
||||
bottom: 4.v,
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(height: 8.v),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(
|
||||
left: 84.h,
|
||||
right: 17.h,
|
||||
),
|
||||
child: _buildColumncheckmark(
|
||||
context,
|
||||
imageOne: ImageConstant.imageNotFound,
|
||||
time: "lbl_10_15".tr,
|
||||
),
|
||||
),
|
||||
SizedBox(height: 8.v),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(
|
||||
left: 84.h,
|
||||
right: 17.h,
|
||||
),
|
||||
child: _buildColumncheckmark(
|
||||
context,
|
||||
imageOne: ImageConstant.imageNotFound,
|
||||
time: "lbl_10_15".tr,
|
||||
),
|
||||
),
|
||||
SizedBox(height: 20.v),
|
||||
Align(
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(
|
||||
left: 10.h,
|
||||
right: 77.h,
|
||||
),
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 11.h,
|
||||
vertical: 4.v,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage(ImageConstant.imageNotFound),
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
SizedBox(height: 3.v),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(left: 7.h),
|
||||
child: Row(
|
||||
children: [
|
||||
SizedBox(
|
||||
height: 33.v,
|
||||
child: VerticalDivider(
|
||||
width: 2.h,
|
||||
thickness: 2.v,
|
||||
endIndent: 1.h,
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(left: 8.h),
|
||||
child: Column(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"lbl_martha_craig".tr,
|
||||
style:
|
||||
CustomTextStyles.titleSmallBold,
|
||||
),
|
||||
Text(
|
||||
"lbl_good_morning".tr,
|
||||
style: CustomTextStyles
|
||||
.bodyMediumBluegray800_1,
|
||||
)
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(height: 4.v),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(left: 6.h),
|
||||
child: Row(
|
||||
children: [
|
||||
Text(
|
||||
"msg_do_you_know_what".tr,
|
||||
style: theme.textTheme.bodyLarge,
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(
|
||||
left: 14.h,
|
||||
top: 8.v,
|
||||
),
|
||||
child: Text(
|
||||
"lbl_11_40".tr,
|
||||
style:
|
||||
CustomTextStyles.bodyMediumBlack900,
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(height: 20.v),
|
||||
Container(
|
||||
height: 34.v,
|
||||
width: 266.h,
|
||||
margin: EdgeInsets.only(right: 11.h),
|
||||
child: Stack(
|
||||
alignment: Alignment.topCenter,
|
||||
children: [
|
||||
CustomImageView(
|
||||
imagePath: ImageConstant.imageNotFound,
|
||||
height: 34.v,
|
||||
width: 266.h,
|
||||
alignment: Alignment.center,
|
||||
),
|
||||
Align(
|
||||
alignment: Alignment.topCenter,
|
||||
child: Padding(
|
||||
padding: EdgeInsets.only(top: 2.v),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(top: 4.v),
|
||||
child: Text(
|
||||
"msg_it_s_morning_in".tr,
|
||||
style: theme.textTheme.bodyLarge,
|
||||
),
|
||||
),
|
||||
CustomImageView(
|
||||
imagePath: ImageConstant.img,
|
||||
height: 19.v,
|
||||
width: 17.h,
|
||||
margin: EdgeInsets.only(
|
||||
left: 10.h,
|
||||
bottom: 7.v,
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(
|
||||
left: 14.h,
|
||||
top: 12.v,
|
||||
),
|
||||
child: Text(
|
||||
"lbl_11_43".tr,
|
||||
style: theme.textTheme.bodySmall,
|
||||
),
|
||||
),
|
||||
CustomImageView(
|
||||
imagePath: ImageConstant.imageNotFound,
|
||||
height: 7.v,
|
||||
width: 14.h,
|
||||
margin: EdgeInsets.only(
|
||||
left: 2.h,
|
||||
top: 13.v,
|
||||
bottom: 5.v,
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(height: 20.v),
|
||||
Align(
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Container(
|
||||
width: 281.h,
|
||||
margin: EdgeInsets.only(
|
||||
left: 17.h,
|
||||
right: 76.h,
|
||||
),
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 11.h,
|
||||
vertical: 2.v,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage(ImageConstant.imageNotFound),
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Container(
|
||||
width: 191.h,
|
||||
margin: EdgeInsets.only(top: 3.v),
|
||||
child: Text(
|
||||
"msg_what_is_the_most".tr,
|
||||
maxLines: 2,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: theme.textTheme.bodyLarge!.copyWith(
|
||||
height: 1.29,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(
|
||||
left: 38.h,
|
||||
top: 34.v,
|
||||
),
|
||||
child: Text(
|
||||
"lbl_11_45".tr,
|
||||
style:
|
||||
CustomTextStyles.bodySmallMulishBluegray800,
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(height: 8.v),
|
||||
Align(
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Container(
|
||||
height: 34.v,
|
||||
width: 178.h,
|
||||
margin: EdgeInsets.only(left: 10.h),
|
||||
child: Stack(
|
||||
alignment: Alignment.bottomCenter,
|
||||
children: [
|
||||
CustomImageView(
|
||||
imagePath: ImageConstant.imageNotFound,
|
||||
height: 34.v,
|
||||
width: 178.h,
|
||||
alignment: Alignment.center,
|
||||
),
|
||||
Align(
|
||||
alignment: Alignment.bottomCenter,
|
||||
child: Padding(
|
||||
padding: EdgeInsets.only(bottom: 3.v),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(bottom: 1.v),
|
||||
child: Text(
|
||||
"lbl_do_you_like_it".tr,
|
||||
style: theme.textTheme.bodyLarge,
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(
|
||||
left: 1.h,
|
||||
top: 8.v,
|
||||
),
|
||||
child: Text(
|
||||
"lbl_11_45".tr,
|
||||
style: CustomTextStyles
|
||||
.bodySmallMulishBluegray800,
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(height: 20.v),
|
||||
Container(
|
||||
height: 34.v,
|
||||
width: 218.h,
|
||||
margin: EdgeInsets.only(right: 17.h),
|
||||
child: Stack(
|
||||
alignment: Alignment.bottomCenter,
|
||||
children: [
|
||||
CustomImageView(
|
||||
imagePath: ImageConstant.imageNotFound,
|
||||
height: 34.v,
|
||||
width: 218.h,
|
||||
alignment: Alignment.center,
|
||||
),
|
||||
Align(
|
||||
alignment: Alignment.bottomCenter,
|
||||
child: Padding(
|
||||
padding: EdgeInsets.only(bottom: 4.v),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: [
|
||||
Text(
|
||||
"msg_i_think_top_two".tr,
|
||||
style: theme.textTheme.bodyLarge,
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(
|
||||
left: 12.h,
|
||||
top: 7.v,
|
||||
),
|
||||
child: Text(
|
||||
"lbl_11_50".tr,
|
||||
style: theme.textTheme.bodySmall,
|
||||
),
|
||||
),
|
||||
CustomImageView(
|
||||
imagePath: ImageConstant.imageNotFound,
|
||||
height: 7.v,
|
||||
width: 14.h,
|
||||
margin: EdgeInsets.only(
|
||||
left: 2.h,
|
||||
top: 9.v,
|
||||
bottom: 4.v,
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(height: 8.v),
|
||||
Container(
|
||||
width: 235.h,
|
||||
margin: EdgeInsets.only(
|
||||
left: 123.h,
|
||||
right: 16.h,
|
||||
),
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 9.h,
|
||||
vertical: 2.v,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage(ImageConstant.imageNotFound),
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
SizedBox(height: 20.v),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(left: 14.h),
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
CustomImageView(
|
||||
imagePath: ImageConstant.imageNotFound,
|
||||
height: 40.adaptSize,
|
||||
width: 40.adaptSize,
|
||||
margin: EdgeInsets.only(bottom: 2.v),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(
|
||||
left: 31.h,
|
||||
top: 5.v,
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"lbl7".tr,
|
||||
style: CustomTextStyles
|
||||
.bodyMediumBluegray800,
|
||||
),
|
||||
Text(
|
||||
"lbl_2_8_mb".tr,
|
||||
style: CustomTextStyles
|
||||
.bodyMediumBluegray800,
|
||||
)
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(height: 4.v),
|
||||
_buildRowcheckmark(
|
||||
context,
|
||||
time: "lbl_11_51".tr,
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(height: 30.v),
|
||||
_buildRowattachone(context)
|
||||
],
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
child: Container(
|
||||
width: double.maxFinite,
|
||||
decoration: AppDecoration.fillGray,
|
||||
child: ListView(
|
||||
children: [
|
||||
SizedBox(height: 30.v),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
bottomNavigationBar: _buildBottomBar(context),
|
||||
bottomNavigationBar: _buildTextField(context),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -531,13 +71,10 @@ class ChatScreen extends StatelessWidget {
|
||||
child: Column(
|
||||
children: [
|
||||
AppbarSubtitle(
|
||||
text: "lbl2".tr,
|
||||
text: "Валерий Леонтьев",
|
||||
),
|
||||
SizedBox(height: 3.v),
|
||||
AppbarSubtitle(
|
||||
text: "msg_12_30".tr,
|
||||
margin: EdgeInsets.only(right: 38.h),
|
||||
)
|
||||
Text("Был в сети вчера", style: theme.textTheme.bodySmall!)
|
||||
],
|
||||
),
|
||||
)
|
||||
@@ -548,7 +85,7 @@ class ChatScreen extends StatelessWidget {
|
||||
}
|
||||
|
||||
/// Section Widget
|
||||
Widget _buildRowattachone(BuildContext context) {
|
||||
_buildTextField(BuildContext context) {
|
||||
return Container(
|
||||
width: double.maxFinite,
|
||||
padding: EdgeInsets.symmetric(
|
||||
@@ -561,7 +98,7 @@ class ChatScreen extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
CustomImageView(
|
||||
imagePath: ImageConstant.imageNotFound,
|
||||
imagePath: ImageConstant.imgAttach,
|
||||
height: 29.adaptSize,
|
||||
width: 29.adaptSize,
|
||||
margin: EdgeInsets.only(
|
||||
@@ -580,7 +117,7 @@ class ChatScreen extends StatelessWidget {
|
||||
builder: (context, messageController) {
|
||||
return CustomTextFormField(
|
||||
controller: messageController,
|
||||
hintText: "lbl_message".tr,
|
||||
hintText: "Напишите сообщение...",
|
||||
textInputAction: TextInputAction.done,
|
||||
);
|
||||
},
|
||||
@@ -588,7 +125,7 @@ class ChatScreen extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
CustomImageView(
|
||||
imagePath: ImageConstant.imageNotFound,
|
||||
imagePath: ImageConstant.imgMic,
|
||||
height: 24.v,
|
||||
width: 18.h,
|
||||
margin: EdgeInsets.only(
|
||||
@@ -602,11 +139,6 @@ class ChatScreen extends StatelessWidget {
|
||||
);
|
||||
}
|
||||
|
||||
/// Section Widget
|
||||
_buildBottomBar(BuildContext context) {
|
||||
return CustomBottomBar(onChanged: (BottomBarEnum type) {});
|
||||
}
|
||||
|
||||
/// Common widget
|
||||
Widget _buildColumncheckmark(
|
||||
BuildContext context, {
|
||||
@@ -661,33 +193,6 @@ class ChatScreen extends StatelessWidget {
|
||||
}
|
||||
|
||||
/// Common widget
|
||||
Widget _buildRowcheckmark(
|
||||
BuildContext context, {
|
||||
required String time,
|
||||
}) {
|
||||
return Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
time,
|
||||
style: theme.textTheme.bodySmall!.copyWith(
|
||||
color: appTheme.blueA400,
|
||||
),
|
||||
),
|
||||
CustomImageView(
|
||||
imagePath: ImageConstant.imageNotFound,
|
||||
height: 7.v,
|
||||
width: 14.h,
|
||||
margin: EdgeInsets.only(
|
||||
left: 2.h,
|
||||
top: 2.v,
|
||||
bottom: 3.v,
|
||||
),
|
||||
)
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
///Handling route based on bottom click actions
|
||||
String getCurrentRoute(BottomBarEnum type) {
|
||||
|
||||
Reference in New Issue
Block a user