ui fixes
This commit is contained in:
parent
bfadb3fe14
commit
ef318464f1
|
|
@ -190,6 +190,24 @@ class AccountScreen extends StatelessWidget {
|
||||||
icon: "privacy.svg",
|
icon: "privacy.svg",
|
||||||
title: "go_to_support".tr,
|
title: "go_to_support".tr,
|
||||||
).onTap(() async {
|
).onTap(() async {
|
||||||
|
if (authController.isGuest.value) {
|
||||||
|
Get.defaultDialog(
|
||||||
|
title: '',
|
||||||
|
content: Column(
|
||||||
|
children: [
|
||||||
|
BoldTextWidget('you_have_to_sign_in'.tr),
|
||||||
|
const SizedBox(
|
||||||
|
height: 20,
|
||||||
|
),
|
||||||
|
ButtonWidget(
|
||||||
|
onTap: () {
|
||||||
|
RoutingManager.off(RouteName.login);
|
||||||
|
},
|
||||||
|
title: 'sign_in'.tr)
|
||||||
|
],
|
||||||
|
));
|
||||||
|
return;
|
||||||
|
}
|
||||||
await chatController.checkSupportRoomStatus(onSuccess: (room) {
|
await chatController.checkSupportRoomStatus(onSuccess: (room) {
|
||||||
room?.type = RoomType.support;
|
room?.type = RoomType.support;
|
||||||
RoutingManager.to(RouteName.chatDetails, arguments: room);
|
RoutingManager.to(RouteName.chatDetails, arguments: room);
|
||||||
|
|
|
||||||
|
|
@ -64,12 +64,13 @@ class CardDetailsScreen extends StatelessWidget {
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 280,
|
height: 280,
|
||||||
child: ListView.separated(
|
child: ListView.builder(
|
||||||
physics: const BouncingScrollPhysics(),
|
physics: const BouncingScrollPhysics(),
|
||||||
itemCount: 12,
|
itemCount: 12,
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
DateTime dateTime = Utils.generateRandomDateTime();
|
DateTime dateTime = Utils.generateRandomDateTime();
|
||||||
return AppointmentWidget(dateTime: dateTime)
|
return AppointmentWidget(dateTime: dateTime)
|
||||||
|
.paddingOnly(bottom: 16)
|
||||||
.onTap(() {
|
.onTap(() {
|
||||||
homeController.scheduleAnAppointment(
|
homeController.scheduleAnAppointment(
|
||||||
Appointment(
|
Appointment(
|
||||||
|
|
@ -83,9 +84,6 @@ class CardDetailsScreen extends StatelessWidget {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
separatorBuilder: (context, index) {
|
|
||||||
return const Divider();
|
|
||||||
},
|
|
||||||
).paddingOnly(left: 8, right: 8, top: 8, bottom: 8),
|
).paddingOnly(left: 8, right: 8, top: 8, bottom: 8),
|
||||||
),
|
),
|
||||||
const SizedBox(
|
const SizedBox(
|
||||||
|
|
@ -108,14 +106,11 @@ class CardDetailsScreen extends StatelessWidget {
|
||||||
borderRadius: BorderRadius.circular(20)),
|
borderRadius: BorderRadius.circular(20)),
|
||||||
contentPadding: EdgeInsets.zero,
|
contentPadding: EdgeInsets.zero,
|
||||||
actionsPadding: EdgeInsets.zero,
|
actionsPadding: EdgeInsets.zero,
|
||||||
title: RegularTextWidget(
|
title: HeaderScreen(
|
||||||
"appointment".tr,
|
' ${"appointment".tr}',
|
||||||
textAlign: TextAlign.center,
|
|
||||||
fontSize: 14,
|
|
||||||
),
|
),
|
||||||
content: AppointmentDetails(
|
content: AppointmentDetails(
|
||||||
dateTime:
|
appointment: homeController.currentCardAppointment.value!),
|
||||||
homeController.currentCardAppointment.value!.dateTime),
|
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -161,9 +156,6 @@ class CardDetailsScreen extends StatelessWidget {
|
||||||
CardInformation(cardModel: cardModel)
|
CardInformation(cardModel: cardModel)
|
||||||
.paddingSymmetric(
|
.paddingSymmetric(
|
||||||
horizontal: Responsive.isTablet() ? 0 : 5, vertical: 5)
|
horizontal: Responsive.isTablet() ? 0 : 5, vertical: 5)
|
||||||
// .paddingOnly(
|
|
||||||
// left: Responsive.isTablet() ? 8 : 0,
|
|
||||||
// )
|
|
||||||
.paddingOnly(
|
.paddingOnly(
|
||||||
left: homeController.isArabic.value ? 0 : 3,
|
left: homeController.isArabic.value ? 0 : 3,
|
||||||
right: homeController.isArabic.value ? 3 : 0,
|
right: homeController.isArabic.value ? 3 : 0,
|
||||||
|
|
@ -347,8 +339,9 @@ class CardDetailsScreen extends StatelessWidget {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
title: "start_conversation".tr,
|
title: "start_conversation".tr,
|
||||||
|
fontSize: 13,
|
||||||
child: SvgPicture.asset("assets/icons/message.svg"),
|
child: SvgPicture.asset("assets/icons/message.svg"),
|
||||||
).expanded(2);
|
).expanded(Responsive.isTablet() ? 1 : 5);
|
||||||
}),
|
}),
|
||||||
),
|
),
|
||||||
if (Responsive.isTablet())
|
if (Responsive.isTablet())
|
||||||
|
|
@ -361,7 +354,7 @@ class CardDetailsScreen extends StatelessWidget {
|
||||||
onTap: () {
|
onTap: () {
|
||||||
appointmentDialog(context);
|
appointmentDialog(context);
|
||||||
},
|
},
|
||||||
fontSize: 12,
|
fontSize: 13,
|
||||||
color: AppColors.secondaryColor,
|
color: AppColors.secondaryColor,
|
||||||
title: 'you_have_an_appointment'.tr,
|
title: 'you_have_an_appointment'.tr,
|
||||||
child: const Icon(
|
child: const Icon(
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ class AppointmentWidget extends StatelessWidget {
|
||||||
),
|
),
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
width: 100,
|
width: 100,
|
||||||
height: 40,
|
height: 50,
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ class CardServiceWidget extends StatelessWidget {
|
||||||
//width: Responsive.isTablet() ? Get.width * 0.3 : null,
|
//width: Responsive.isTablet() ? Get.width * 0.3 : null,
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: width ??
|
width: width ??
|
||||||
(Responsive.isTablet() ? Get.width * 0.334 : Get.width * 0.669),
|
(Responsive.isTablet() ? Get.width * 0.3 : Get.width * 0.669),
|
||||||
child: RegularTextWidget(
|
child: RegularTextWidget(
|
||||||
cardModel.services,
|
cardModel.services,
|
||||||
maxLines: maxLines,
|
maxLines: maxLines,
|
||||||
|
|
|
||||||
|
|
@ -18,9 +18,10 @@ class ChatScreen extends StatelessWidget {
|
||||||
Timer? debouncer;
|
Timer? debouncer;
|
||||||
TextEditingController searchFieldController = TextEditingController();
|
TextEditingController searchFieldController = TextEditingController();
|
||||||
ScrollController scrollController = ScrollController();
|
ScrollController scrollController = ScrollController();
|
||||||
String lastDate = 'today'.tr;
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
String lastDate = 'today'.tr;
|
||||||
if (chatController.rooms.result.data.isEmpty) {
|
if (chatController.rooms.result.data.isEmpty) {
|
||||||
chatController.getRooms();
|
chatController.getRooms();
|
||||||
}
|
}
|
||||||
|
|
@ -56,6 +57,9 @@ class ChatScreen extends StatelessWidget {
|
||||||
SearchBarWidget(
|
SearchBarWidget(
|
||||||
controller: searchFieldController,
|
controller: searchFieldController,
|
||||||
onChanged: (value) {
|
onChanged: (value) {
|
||||||
|
if (value == '') {
|
||||||
|
lastDate = 'today'.tr;
|
||||||
|
}
|
||||||
if (debouncer?.isActive ?? false) {
|
if (debouncer?.isActive ?? false) {
|
||||||
debouncer!.cancel();
|
debouncer!.cancel();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user