chat list ui added-1.

design_3.0_cx_module
Sikander Saleem 4 weeks ago
parent 18a53d7518
commit 96b65e99fa

@ -0,0 +1,3 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M9.57353 4.19999C7.42937 4.19999 5.69118 5.94608 5.69118 8.09998V13.4625C5.69118 16.9626 8.51573 19.8 12 19.8C15.4843 19.8 18.3088 16.9626 18.3088 13.4625V12C18.3088 11.4616 18.7434 11.025 19.2794 11.025C19.8155 11.025 20.25 11.4616 20.25 12V13.4625C20.25 18.0396 16.5563 21.75 12 21.75C7.44365 21.75 3.75 18.0396 3.75 13.4625V8.09998C3.75 4.86913 6.35728 2.25 9.57353 2.25C12.7898 2.25 15.3971 4.86913 15.3971 8.09998V13.4625C15.3971 15.3471 13.8761 16.875 12 16.875C10.1239 16.875 8.60294 15.3471 8.60294 13.4625V9.56248C8.60294 9.024 9.03749 8.58748 9.57353 8.58748C10.1096 8.58748 10.5441 9.024 10.5441 9.56248V13.4625C10.5441 14.2702 11.1959 14.925 12 14.925C12.8041 14.925 13.4559 14.2702 13.4559 13.4625V8.09998C13.4559 5.94608 11.7177 4.19999 9.57353 4.19999Z" fill="#7D859A"/>
</svg>

After

Width:  |  Height:  |  Size: 938 B

@ -0,0 +1,3 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M0.833374 7.99992C0.833374 11.9579 4.04204 15.1666 8.00004 15.1666C11.958 15.1666 15.1667 11.9579 15.1667 7.99992C15.1667 4.04192 11.958 0.833252 8.00004 0.833252C4.04204 0.833252 0.833374 4.04192 0.833374 7.99992ZM11.1174 5.50858C11.3887 5.75724 11.4067 6.17924 11.158 6.45057L7.49138 10.4506C7.36872 10.5846 7.19604 10.6626 7.01471 10.6666C6.83271 10.6706 6.65737 10.5999 6.5287 10.4713L4.86204 8.80461C4.60137 8.54461 4.60137 8.1219 4.86204 7.8619C5.12204 7.60123 5.54471 7.60123 5.80471 7.8619L6.97937 9.03592L10.1754 5.54927C10.424 5.27793 10.846 5.25991 11.1174 5.50858Z" fill="#7D859A"/>
</svg>

After

Width:  |  Height:  |  Size: 747 B

@ -0,0 +1,4 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M6.25 7C6.25 3.82436 8.82436 1.25 12 1.25C14.6852 1.25 16.9406 3.09067 17.5731 5.57911C17.6475 5.87191 17.6847 6.01832 17.5947 6.13416C17.5046 6.25 17.3425 6.25 17.0183 6.25H14C13.5858 6.25 13.25 6.58579 13.25 7C13.25 7.41421 13.5858 7.75 14 7.75H17.15C17.4328 7.75 17.5743 7.75 17.6621 7.83787C17.75 7.92574 17.75 8.06716 17.75 8.35V9.65C17.75 9.93284 17.75 10.0743 17.6621 10.1621C17.5743 10.25 17.4328 10.25 17.15 10.25H14C13.5858 10.25 13.25 10.5858 13.25 11C13.25 11.4142 13.5858 11.75 14 11.75H17.0183C17.3425 11.75 17.5046 11.75 17.5947 11.8658C17.6847 11.9817 17.6475 12.1281 17.5731 12.4209C16.9406 14.9093 14.6852 16.75 12 16.75C8.82436 16.75 6.25 14.1756 6.25 11V7Z" fill="#7D859A"/>
<path d="M5.19444 11.2115C5.19444 10.6805 4.75917 10.25 4.22222 10.25C3.68528 10.25 3.25 10.6805 3.25 11.2115C3.25 15.6659 6.65283 19.3343 11.0278 19.8126V20.8269H9.08333C8.54639 20.8269 8.11111 21.2574 8.11111 21.7885C8.11111 22.3195 8.54639 22.75 9.08333 22.75H14.9167C15.4536 22.75 15.8889 22.3195 15.8889 21.7885C15.8889 21.2574 15.4536 20.8269 14.9167 20.8269H12.9722V19.8126C17.3472 19.3343 20.75 15.6659 20.75 11.2115C20.75 10.6805 20.3147 10.25 19.7778 10.25C19.2408 10.25 18.8056 10.6805 18.8056 11.2115C18.8056 14.9288 15.7586 17.9423 12 17.9423C8.2414 17.9423 5.19444 14.9288 5.19444 11.2115Z" fill="#7D859A"/>
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

@ -0,0 +1,4 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M14.6823 2.78682C12.7265 2.73772 11.2735 2.73773 9.3177 2.78682L9.24285 2.7887C7.73349 2.82654 6.49161 2.85768 5.49064 3.03184C4.42828 3.21668 3.53876 3.57665 2.78536 4.3322C2.0359 5.0838 1.67705 5.95955 1.49526 7.00541C1.32465 7.98693 1.29883 9.19814 1.26758 10.6641L1.26597 10.7395C1.24467 11.7377 1.24468 12.2678 1.26599 13.266L1.2676 13.3414C1.29884 14.8073 1.32466 16.0185 1.49527 17.0001C1.67707 18.0459 2.03592 18.9217 2.78537 19.6733C3.53878 20.4288 4.42829 20.7888 5.49066 20.9736C6.49161 21.1478 7.73348 21.1789 9.24282 21.2168L9.31772 21.2187C9.91661 21.2337 10.4684 21.2441 11.0018 21.2499C11.553 21.256 11.9998 20.8085 11.9998 20.2572C11.9998 19.7058 11.553 19.2594 11.0018 19.2532C10.4846 19.2474 9.94927 19.2373 9.36791 19.2227C7.76497 19.1824 6.67174 19.1525 5.83355 19.0066C5.04027 18.8686 4.5781 18.6421 4.20122 18.2641C3.82038 17.8822 3.59776 17.4261 3.46432 16.6585C3.32261 15.8432 3.29736 14.7839 3.26405 13.2234C3.24334 12.2536 3.24333 11.7519 3.26403 10.7821C3.28003 10.0328 3.29416 9.399 3.32023 8.85233C3.33957 8.44669 3.34924 8.24387 3.49608 8.1629C3.64292 8.08193 3.82343 8.18424 4.18445 8.38885L8.41985 10.7894C9.71946 11.526 10.8186 12.0027 11.9998 12.0027C13.181 12.0027 14.2801 11.526 15.5798 10.7894L19.8155 8.38864C20.1765 8.18402 20.3571 8.08172 20.5039 8.16269C20.6507 8.24366 20.6604 8.44648 20.6798 8.8521C20.7058 9.39883 20.72 10.0327 20.736 10.7821C20.7484 11.3637 20.7533 11.777 20.7509 12.2239C20.7478 12.7759 21.1833 13.2329 21.7351 13.2447C22.2868 13.2564 22.7457 12.8185 22.7492 12.2665C22.7522 11.7895 22.7471 11.3529 22.734 10.7395L22.7324 10.6641C22.7012 9.19819 22.6753 7.98692 22.5047 7.00542C22.3229 5.95955 21.9641 5.0838 21.2146 4.33221C20.7913 3.90762 20.3249 3.60795 19.809 3.39408C19.7305 3.35121 19.6464 3.3189 19.5587 3.29827C19.2289 3.18196 18.8796 3.09626 18.5093 3.03184C17.5084 2.85768 16.2665 2.82654 14.7571 2.78869L14.6823 2.78682Z" fill="#3DA5E5"/>
<path d="M12.75 17.5059C12.75 18.0581 13.1977 18.5059 13.75 18.5059L18.25 18.5059L18.25 19.0884C18.2499 19.264 18.2497 19.4797 18.2718 19.6561L18.2722 19.6595C18.288 19.7859 18.3598 20.362 18.9254 20.6363C19.4922 20.9113 19.9924 20.6094 20.1006 20.544L20.1046 20.5416C20.2577 20.4494 20.4285 20.3152 20.5691 20.2049L20.5993 20.1812C20.9752 19.8865 21.4594 19.5046 21.8504 19.1241C22.0455 18.9343 22.2467 18.717 22.4056 18.4861C22.5468 18.2809 22.75 17.9307 22.75 17.5C22.75 17.0693 22.5468 16.7191 22.4056 16.5139C22.2467 16.283 22.0455 16.0657 21.8504 15.8759C21.4594 15.4954 20.9752 15.1135 20.5993 14.8188L20.5691 14.7951C20.4285 14.6848 20.2576 14.5506 20.1046 14.4584L20.1006 14.456C19.9924 14.3907 19.4923 14.0887 18.9254 14.3637C18.3598 14.638 18.288 15.2141 18.2722 15.3405L18.2718 15.3439C18.2497 15.5203 18.2499 15.736 18.25 15.9116L18.25 16.5059L13.75 16.5059C13.1977 16.5059 12.75 16.9536 12.75 17.5059Z" fill="#3DA5E5"/>
</svg>

After

Width:  |  Height:  |  Size: 2.9 KiB

@ -0,0 +1,5 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M7.99997 1.5C10.0349 1.5 11.8358 2.41647 13.0929 3.2848C13.7278 3.72335 14.2407 4.1612 14.5958 4.49009C14.769 4.65053 15.0521 4.94112 15.1554 5.04714L15.1633 5.05528C15.4089 5.32957 15.3856 5.75104 15.1114 5.99666C14.8372 6.2421 14.4162 6.21905 14.1705 5.94528C14.0888 5.86144 13.8492 5.61599 13.6897 5.46824C13.37 5.17214 12.9067 4.77665 12.3351 4.38186C11.1794 3.58353 9.6469 2.83333 7.99997 2.83333C6.35304 2.83333 4.82057 3.58353 3.66481 4.38186C3.09328 4.77665 2.6299 5.17214 2.31024 5.46824C2.15075 5.61599 1.91166 5.86086 1.82997 5.94471L1.82945 5.94528C1.58377 6.21905 1.16269 6.2421 0.888578 5.99666C0.614282 5.75104 0.59103 5.32957 0.836643 5.05528L0.844496 5.04722C0.947718 4.94126 1.23091 4.65057 1.40415 4.49009C1.7592 4.1612 2.27213 3.72335 2.90703 3.2848C4.16413 2.41647 5.965 1.5 7.99997 1.5Z" fill="#7D859A"/>
<path d="M7.99996 10.6666C7.26358 10.6666 6.66663 10.0697 6.66663 9.33329C6.66663 8.59691 7.26358 7.99996 7.99996 7.99996C8.73634 7.99996 9.33329 8.59691 9.33329 9.33329C9.33329 10.0697 8.73634 10.6666 7.99996 10.6666Z" fill="#7D859A"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M3.68016 5.80862C4.81726 4.9209 6.28625 4.16663 7.99996 4.16663C9.71367 4.16663 11.1827 4.9209 12.3198 5.80861C13.4579 6.69713 14.3346 7.79593 14.8052 8.45578C14.9739 8.6905 15.1666 8.95849 15.1666 9.33329C15.1666 9.70809 14.9739 9.97608 14.8052 10.2108C14.3346 10.8707 13.4579 11.9695 12.3198 12.858C11.1827 13.7457 9.71367 14.5 7.99996 14.5C6.28625 14.5 4.81726 13.7457 3.68016 12.858C2.54205 11.9695 1.66532 10.8707 1.19475 10.2108C1.02598 9.97608 0.833293 9.7081 0.833293 9.33329C0.833293 8.95849 1.02598 8.6905 1.19475 8.45578C1.66532 7.79593 2.54205 6.69713 3.68016 5.80862ZM5.33329 9.33329C5.33329 10.8061 6.5272 12 7.99996 12C9.47272 12 10.6666 10.8061 10.6666 9.33329C10.6666 7.86053 9.47272 6.66663 7.99996 6.66663C6.5272 6.66663 5.33329 7.86053 5.33329 9.33329Z" fill="#7D859A"/>
</svg>

After

Width:  |  Height:  |  Size: 2.0 KiB

@ -0,0 +1,4 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M11.0353 6.33778C11.2219 6.13422 11.2081 5.81794 11.0046 5.63134C10.801 5.44475 10.4847 5.4585 10.2981 5.66206L6.98433 9.27711L5.68693 7.9797C5.49167 7.78444 5.17508 7.78444 4.97982 7.9797C4.78456 8.17496 4.78456 8.49155 4.97982 8.68681L6.64649 10.3535C6.74292 10.4499 6.87456 10.5028 7.0109 10.4998C7.14725 10.4968 7.27647 10.4383 7.36862 10.3378L11.0353 6.33778Z" fill="#7D859A"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M8.00004 15.1666C4.042 15.1666 0.833374 11.958 0.833374 7.99992C0.833374 4.04188 4.042 0.833252 8.00004 0.833252C11.9581 0.833252 15.1667 4.04188 15.1667 7.99992C15.1667 11.958 11.9581 15.1666 8.00004 15.1666ZM1.83337 7.99992C1.83337 11.4057 4.59428 14.1666 8.00004 14.1666C11.4058 14.1666 14.1667 11.4057 14.1667 7.99992C14.1667 4.59416 11.4058 1.83325 8.00004 1.83325C4.59428 1.83325 1.83337 4.59416 1.83337 7.99992Z" fill="#7D859A"/>
</svg>

After

Width:  |  Height:  |  Size: 981 B

@ -1,4 +1,11 @@
import 'package:audio_waveforms/audio_waveforms.dart';
import 'package:flutter/material.dart';
import 'package:test_sa/extensions/int_extensions.dart';
import 'package:test_sa/extensions/string_extensions.dart';
import 'package:test_sa/extensions/text_extensions.dart';
import 'package:test_sa/extensions/widget_extensions.dart';
import 'package:test_sa/modules/cm_module/views/components/action_button/footer_action_button.dart';
import 'package:test_sa/new_views/app_style/app_color.dart';
import 'package:test_sa/new_views/common_widgets/default_app_bar.dart';
class ChatPage extends StatefulWidget {
@ -11,6 +18,13 @@ class ChatPage extends StatefulWidget {
}
class _ChatPageState extends State<ChatPage> {
bool isSender = false;
bool isAudioRecording = false;
String? recordedFilePath;
final RecorderController recorderController = RecorderController();
PlayerController playerController = PlayerController();
@override
void initState() {
super.initState();
@ -18,17 +32,330 @@ class _ChatPageState extends State<ChatPage> {
@override
void dispose() {
recorderController.dispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: AppColor.white10,
appBar: const DefaultAppBar(title: "Req No. 343443"),
body: Column(
children: [
Container(
color: AppColor.neutral50,
constraints: const BoxConstraints(maxHeight: 56),
padding: const EdgeInsets.all(16),
child: Row(
children: [
Text(
"Engineer: Mahmoud Shrouf",
overflow: TextOverflow.ellipsis,
maxLines: 2,
style: AppTextStyles.bodyText2.copyWith(color: AppColor.white10),
).expanded,
4.width,
Text(
"View All Documents",
style: AppTextStyles.bodyText.copyWith(
color: AppColor.white10,
decoration: TextDecoration.underline,
decorationColor: AppColor.white10,
),
),
],
),
),
Container(
// width: double.infinity,
color: AppColor.neutral100,
child: ListView(
padding: const EdgeInsets.all(16),
children: [
recipientMsgCard(true, "Please let me know what is the issue? Please let me know what is the issue?"),
recipientMsgCard(false, "testing"),
recipientMsgCard(false, "testing testing testing"),
dateCard("Mon 27 Oct"),
senderMsgCard(true, "Please let me know what is the issue? Please let me know what is the issue?"),
senderMsgCard(false, "Please let me know what is the issue?"),
],
)).expanded,
Divider(height: 1, thickness: 1, color: const Color(0xff767676).withOpacity(.11)),
SafeArea(
child: ConstrainedBox(
constraints: const BoxConstraints(minHeight: 56),
child: Row(
children: [
if (recordedFilePath == null) ...[
isAudioRecording
? AudioWaveforms(
size: Size(MediaQuery.of(context).size.width, 56.0),
// enableGesture: true,
waveStyle: const WaveStyle(waveColor: AppColor.neutral50, extendWaveform: true, showMiddleLine: false),
padding: const EdgeInsets.only(left: 16),
recorderController: recorderController, // Customize how waveforms looks.
).expanded
: TextFormField(
cursorColor: AppColor.neutral50,
style: AppTextStyles.bodyText.copyWith(color: AppColor.neutral50),
minLines: 1,
maxLines: 3,
textInputAction: TextInputAction.none,
keyboardType: TextInputType.multiline,
decoration: InputDecoration(
enabledBorder: InputBorder.none,
focusedBorder: InputBorder.none,
border: InputBorder.none,
errorBorder: InputBorder.none,
contentPadding: const EdgeInsets.only(left: 16, top: 8, bottom: 8),
alignLabelWithHint: true,
filled: true,
constraints: const BoxConstraints(),
suffixIconConstraints: const BoxConstraints(),
hintText: "Type your message here...",
hintStyle: AppTextStyles.bodyText.copyWith(color: const Color(0xffCCCCCC)),
// suffixIcon: Row(
// mainAxisSize: MainAxisSize.min,
// crossAxisAlignment: CrossAxisAlignment.end,
// mainAxisAlignment: MainAxisAlignment.end,
// children: [
//
// 8.width,
// ],
// )
),
).expanded,
IconButton(
onPressed: () {},
style: const ButtonStyle(
tapTargetSize: MaterialTapTargetSize.shrinkWrap, // or .padded
),
icon: "chat_attachment".toSvgAsset(width: 24, height: 24),
constraints: const BoxConstraints(),
),
],
if (recordedFilePath == null)
...[]
else ...[
IconButton(
onPressed: () async {
await playerController.preparePlayer(path: recordedFilePath!);
playerController.startPlayer();
},
style: const ButtonStyle(
tapTargetSize: MaterialTapTargetSize.shrinkWrap, // or .padded
),
icon: const Icon(Icons.play_circle_fill_rounded, size: 20),
constraints: const BoxConstraints(),
),
AudioFileWaveforms(
playerController: playerController,
size: Size(300, 50),
).expanded,
IconButton(
onPressed: () async {
playerController.pausePlayer();
},
style: const ButtonStyle(
tapTargetSize: MaterialTapTargetSize.shrinkWrap, // or .padded
),
icon: const Icon(Icons.pause_circle_filled_outlined, size: 20),
constraints: const BoxConstraints(),
),
IconButton(
onPressed: () {},
style: const ButtonStyle(
tapTargetSize: MaterialTapTargetSize.shrinkWrap, // or .padded
),
icon: "delete".toSvgAsset(width: 24, height: 24),
constraints: const BoxConstraints(),
),
],
// if (isAudioRecording && recorderController.isRecording)
// IconButton(
// onPressed: () {},
// style: const ButtonStyle(
// tapTargetSize: MaterialTapTargetSize.shrinkWrap, // or .padded
// ),
// icon: "chat_msg_send".toSvgAsset(width: 24, height: 24),
// constraints: const BoxConstraints(),
// ),
if (isAudioRecording)
IconButton(
onPressed: () async {
isAudioRecording = false;
await recorderController.pause();
recordedFilePath = await recorderController.stop();
setState(() {});
},
style: const ButtonStyle(
tapTargetSize: MaterialTapTargetSize.shrinkWrap, // or .padded
),
icon: Icon(Icons.stop_circle_rounded),
constraints: const BoxConstraints(),
)
else
IconButton(
onPressed: () async {
await recorderController.checkPermission();
if (recorderController.hasPermission) {
setState(() {
isAudioRecording = true;
});
recorderController.record();
} else {
"Audio permission denied. Please enable from setting".showToast;
}
// if (!isPermissionGranted) {
// "Audio permission denied. Please enable from setting".showToast;
// return;
// }
},
style: const ButtonStyle(
tapTargetSize: MaterialTapTargetSize.shrinkWrap, // or .padded
),
icon: "chat_mic".toSvgAsset(width: 24, height: 24),
constraints: const BoxConstraints(),
),
IconButton(
onPressed: () {},
style: const ButtonStyle(
tapTargetSize: MaterialTapTargetSize.shrinkWrap, // or .padded
),
icon: "chat_msg_send".toSvgAsset(width: 24, height: 24),
constraints: const BoxConstraints(),
),
8.width,
],
),
),
)
],
),
);
}
Widget dateCard(String date) {
return Container(
padding: const EdgeInsets.symmetric(vertical: 4, horizontal: 8),
margin: const EdgeInsets.only(top: 16, bottom: 8),
decoration: BoxDecoration(
color: AppColor.neutral50,
borderRadius: BorderRadius.circular(6),
),
child: Text(date, style: AppTextStyles.bodyText2.copyWith(color: AppColor.white10)))
.center;
}
Widget senderMsgCard(bool showHeader, String msg) {
Widget senderHeader = Row(
mainAxisSize: MainAxisSize.min,
children: [
Text(
"Jeniffer Jeniffer Jeniffer(Me)",
overflow: TextOverflow.ellipsis,
maxLines: 1,
style: AppTextStyles.bodyText.copyWith(color: AppColor.neutral50, fontWeight: FontWeight.w600),
),
8.width,
Container(
height: 26,
width: 26,
decoration: BoxDecoration(shape: BoxShape.circle, color: Colors.grey),
),
],
);
return Align(
alignment: Alignment.centerRight,
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
if (showHeader) ...[senderHeader, 4.height] else 8.height,
Container(
padding: const EdgeInsets.all(8),
margin: const EdgeInsets.only(right: 26 + 8, left: 26 + 8),
decoration: BoxDecoration(
color: AppColor.white10,
borderRadius: BorderRadius.circular(6),
),
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Text(
msg,
style: AppTextStyles.bodyText2.copyWith(color: AppColor.neutral120),
),
Text(
"2:00 PM",
style: AppTextStyles.textFieldLabelStyle.copyWith(color: AppColor.neutral50.withOpacity(0.5)),
),
],
)),
],
),
);
}
Widget recipientMsgCard(bool showHeader, String msg) {
Widget recipientHeader = Row(
mainAxisSize: MainAxisSize.min,
children: [
Container(
height: 26,
width: 26,
decoration: BoxDecoration(shape: BoxShape.circle, color: Colors.grey),
),
8.width,
Text(
"Mahmoud Shrouf",
overflow: TextOverflow.ellipsis,
maxLines: 1,
style: AppTextStyles.bodyText.copyWith(color: AppColor.neutral50, fontWeight: FontWeight.w600),
)
],
);
return Align(
alignment: Alignment.centerLeft,
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
if (showHeader) ...[recipientHeader, 4.height] else 8.height,
Container(
padding: const EdgeInsets.all(8),
margin: const EdgeInsets.only(left: 26 + 8, right: 26 + 8),
decoration: BoxDecoration(
color: AppColor.primary10,
borderRadius: BorderRadius.circular(6),
),
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Text(
msg,
style: AppTextStyles.bodyText2.copyWith(color: AppColor.white10),
),
Align(
alignment: Alignment.centerRight,
widthFactor: 1,
child: Text(
"2:00 PM",
style: AppTextStyles.textFieldLabelStyle.copyWith(color: AppColor.white10),
),
),
],
)),
],
),
);

@ -31,6 +31,7 @@ class _ChatPageState extends State<ChatRoomsPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: AppColor.neutral100,
appBar: const DefaultAppBar(title: "Chats"),
body: SingleChildScrollView(
padding: const EdgeInsets.all(16),
@ -49,12 +50,25 @@ class _ChatPageState extends State<ChatRoomsPage> {
overflow: TextOverflow.ellipsis,
style: AppTextStyles.bodyText.copyWith(color: context.isDark ? AppColor.neutral10 : AppColor.neutral50, fontWeight: FontWeight.w600),
),
Text(
"Asset No. : HMG212",
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: AppTextStyles.bodyText2.copyWith(color: context.isDark ? AppColor.neutral10 : AppColor.neutral120),
),
Text(
"Request No. : 432212",
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: AppTextStyles.bodyText2.copyWith(color: context.isDark ? AppColor.neutral10 : AppColor.neutral120),
),
6.height,
Text(
"Mon 27 Oct, 2:00 PM",
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: AppTextStyles.bodyText2.copyWith(color: context.isDark ? AppColor.neutral10 : AppColor.neutral120),
),
],
).expanded,
getStatus(),

@ -39,6 +39,7 @@ class _SurveyPageState extends State<SurveyPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: AppColor.neutral100,
appBar: const DefaultAppBar(title: "Survey"),
body: Column(
children: [
@ -117,8 +118,6 @@ class _SurveyPageState extends State<SurveyPage> {
label: context.translation.submit,
buttonColor: AppColor.primary10,
onPressed: () {
Navigator.push(context, MaterialPageRoute(builder: (context) => ChatRoomsPage()));
return;
if (serviceSatisfiedRating < 0) {
"Provide rate services satisfaction".showToast;
return;
@ -127,6 +126,8 @@ class _SurveyPageState extends State<SurveyPage> {
"Provide rate services provided by engineer".showToast;
return;
}
Navigator.push(context, MaterialPageRoute(builder: (context) => ChatRoomsPage()));
return;
},
),
),

@ -226,9 +226,9 @@ class _LoginPageState extends State<LoginPage> {
}
Future<void> _login() async {
// Navigator.push(context, MaterialPageRoute(builder: (context) => SurveyPage()));
//
// return;
Navigator.push(context, MaterialPageRoute(builder: (context) => SurveyPage()));
return;
if (!_formKey.currentState!.validate()) return;
if (privacyPolicyChecked == false) {

@ -49,6 +49,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "0.1.23"
audio_waveforms:
dependency: "direct main"
description:
name: audio_waveforms
sha256: "658fef41bbab299184b65ba2fd749e8ec658c1f7d54a21f7cf97fa96b173b4ce"
url: "https://pub.dev"
source: hosted
version: "1.3.0"
audioplayers:
dependency: "direct main"
description:

@ -95,6 +95,7 @@ dependencies:
safe_device: ^1.2.1
toggle_switch: ^2.3.0
clipboard: ^2.0.2
audio_waveforms: ^1.3.0
local_auth_darwin: any
dev_dependencies:

Loading…
Cancel
Save