livecare enhancements in progress
parent
3030c13a17
commit
f17142419c
@ -0,0 +1,5 @@
|
||||
<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect width="40" height="40" rx="8" fill="#EFEFF0"/>
|
||||
<path d="M24.5303 16.5303C24.8232 16.2374 24.8232 15.7626 24.5303 15.4697C24.2374 15.1768 23.7626 15.1768 23.4697 15.4697L20.0001 18.9393L18.0303 16.9697C17.7374 16.6768 17.2625 16.6768 16.9697 16.9697C16.6768 17.2626 16.6768 17.7375 16.9697 18.0303L18.9394 19.9999L18.4697 20.4697C18.1768 20.7626 18.1768 21.2374 18.4697 21.5303C18.7626 21.8232 19.2374 21.8232 19.5303 21.5303L20.0001 21.0606L20.4696 21.53C20.7625 21.8229 21.2373 21.8228 21.5302 21.5299C21.8231 21.237 21.8231 20.7622 21.5302 20.4693L21.0608 19.9999L24.5303 16.5303Z" fill="#2E3039"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M20 9.25C14.0629 9.25 9.25 14.0629 9.25 20C9.25 25.9371 14.0629 30.75 20 30.75C25.9371 30.75 30.75 25.9371 30.75 20C30.75 14.0629 25.9371 9.25 20 9.25ZM10.75 20C10.75 14.8914 14.8914 10.75 20 10.75C25.1086 10.75 29.25 14.8914 29.25 20C29.25 25.1086 25.1086 29.25 20 29.25C14.8914 29.25 10.75 25.1086 10.75 20Z" fill="#2E3039"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
@ -0,0 +1,85 @@
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:hmg_patient_app_new/core/app_assets.dart';
|
||||
import 'package:hmg_patient_app_new/core/app_state.dart';
|
||||
import 'package:hmg_patient_app_new/core/utils/size_utils.dart';
|
||||
import 'package:hmg_patient_app_new/core/utils/utils.dart';
|
||||
import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
|
||||
import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
|
||||
import 'package:hmg_patient_app_new/theme/colors.dart';
|
||||
|
||||
import '../../../../core/dependencies.dart';
|
||||
import '../../../../generated/locale_keys.g.dart';
|
||||
|
||||
class LiveCareRescheduleWidget extends StatelessWidget {
|
||||
LiveCareRescheduleWidget({super.key});
|
||||
|
||||
late AppState appState;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
appState = getIt.get<AppState>();
|
||||
return Column(
|
||||
children: [
|
||||
checkInOptionCard(
|
||||
AppAssets.liveCareRescheduleIcon,
|
||||
"After 30 mins",
|
||||
"You will be called by the doctor after 30 mins",
|
||||
// "Call for immediate assistance",
|
||||
).onPress(() {
|
||||
Navigator.of(context).pop();
|
||||
}),
|
||||
SizedBox(height: 16.h),
|
||||
checkInOptionCard(
|
||||
AppAssets.liveCareRescheduleIcon,
|
||||
"After 1 hour",
|
||||
"You will be called by the doctor after 1 hour",
|
||||
).onPress(() async {
|
||||
Navigator.of(context).pop();
|
||||
}),
|
||||
SizedBox(height: 16.h),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Widget checkInOptionCard(String icon, String title, String subTitle) {
|
||||
return Container(
|
||||
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
|
||||
color: AppColors.whiteColor,
|
||||
borderRadius: 20.r,
|
||||
hasShadow: false,
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Utils.buildSvgWithAssets(icon: icon, width: 40.h, height: 40.h, fit: BoxFit.fill),
|
||||
SizedBox(height: 16.h),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
title.toText16(isBold: true, color: AppColors.textColor),
|
||||
subTitle.toText12(isBold: true, color: AppColors.greyTextColor),
|
||||
],
|
||||
),
|
||||
),
|
||||
Transform.flip(
|
||||
flipX: appState.isArabic(),
|
||||
child: Utils.buildSvgWithAssets(
|
||||
icon: AppAssets.forward_arrow_icon_small,
|
||||
iconColor: AppColors.blackColor,
|
||||
width: 18.h,
|
||||
height: 13.h,
|
||||
fit: BoxFit.contain,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
).paddingAll(16.h),
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,96 @@
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:hmg_patient_app_new/core/app_assets.dart';
|
||||
import 'package:hmg_patient_app_new/core/app_state.dart';
|
||||
import 'package:hmg_patient_app_new/core/dependencies.dart';
|
||||
import 'package:hmg_patient_app_new/core/utils/size_utils.dart';
|
||||
import 'package:hmg_patient_app_new/core/utils/utils.dart';
|
||||
import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
|
||||
import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
|
||||
import 'package:hmg_patient_app_new/theme/colors.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
|
||||
import '../../../../generated/locale_keys.g.dart';
|
||||
|
||||
class LivecareSupportWidget extends StatelessWidget {
|
||||
LivecareSupportWidget({super.key});
|
||||
|
||||
late AppState appState;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
appState = getIt.get<AppState>();
|
||||
return Column(
|
||||
children: [
|
||||
checkInOptionCard(
|
||||
AppAssets.call_fill,
|
||||
LocaleKeys.liveCareSupportAssistance.tr(),
|
||||
LocaleKeys.callForAssistance.tr(),
|
||||
// "Call for immediate assistance",
|
||||
).onPress(() {
|
||||
launchUrl(Uri.parse("tel://" + "+966 11 525 9553"));
|
||||
}),
|
||||
SizedBox(height: 16.h),
|
||||
checkInOptionCard(
|
||||
AppAssets.whatsapp,
|
||||
LocaleKeys.liveCareSupportWhatsApp.tr(),
|
||||
LocaleKeys.viewNearestHMGLocations.tr(),
|
||||
).onPress(() async {
|
||||
final String url = "https://wa.me/+966553034949"; // Replace with your WhatsApp number
|
||||
final Uri whatsappUri = Uri.parse(url);
|
||||
|
||||
if (await canLaunchUrl(whatsappUri)) {
|
||||
await launchUrl(
|
||||
whatsappUri,
|
||||
mode: LaunchMode.externalApplication, // Forces the OS to open the WhatsApp app
|
||||
);
|
||||
} else {
|
||||
// throw 'Could not launch WhatsApp. Ensure the app is installed.';
|
||||
}
|
||||
}),
|
||||
SizedBox(height: 16.h),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Widget checkInOptionCard(String icon, String title, String subTitle) {
|
||||
return Container(
|
||||
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
|
||||
color: AppColors.whiteColor,
|
||||
borderRadius: 20.r,
|
||||
hasShadow: false,
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Utils.buildSvgWithAssets(icon: icon, width: 24.h, height: 24.h, fit: BoxFit.fill, applyThemeColor: false),
|
||||
SizedBox(height: 16.h),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
title.toText16(isBold: true, color: AppColors.textColor),
|
||||
// subTitle.toText12(isBold: true, color: AppColors.greyTextColor),
|
||||
],
|
||||
),
|
||||
),
|
||||
Transform.flip(
|
||||
flipX: appState.isArabic(),
|
||||
child: Utils.buildSvgWithAssets(
|
||||
icon: AppAssets.forward_arrow_icon_small,
|
||||
iconColor: AppColors.blackColor,
|
||||
width: 18.h,
|
||||
height: 13.h,
|
||||
fit: BoxFit.contain,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
).paddingAll(16.h),
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,89 @@
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:hmg_patient_app_new/core/app_assets.dart';
|
||||
import 'package:hmg_patient_app_new/core/app_state.dart';
|
||||
import 'package:hmg_patient_app_new/core/dependencies.dart';
|
||||
import 'package:hmg_patient_app_new/core/utils/size_utils.dart';
|
||||
import 'package:hmg_patient_app_new/core/utils/utils.dart';
|
||||
import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
|
||||
import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
|
||||
import 'package:hmg_patient_app_new/features/immediate_livecare/immediate_livecare_view_model.dart';
|
||||
import 'package:hmg_patient_app_new/theme/colors.dart';
|
||||
|
||||
import '../../../../generated/locale_keys.g.dart';
|
||||
|
||||
class PreferredConsultationLanguageSelect extends StatelessWidget {
|
||||
PreferredConsultationLanguageSelect({super.key, required this.immediateLiveCareViewModel});
|
||||
|
||||
late AppState appState;
|
||||
ImmediateLiveCareViewModel immediateLiveCareViewModel;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
appState = getIt.get<AppState>();
|
||||
return Column(
|
||||
children: [
|
||||
checkInOptionCard(
|
||||
AppAssets.call_fill,
|
||||
LocaleKeys.preferredConsultationLanguageAr.tr(),
|
||||
LocaleKeys.callForAssistance.tr(),
|
||||
// "Call for immediate assistance",
|
||||
).onPress(() {
|
||||
immediateLiveCareViewModel.setSelectedConsultationLanguage(1);
|
||||
Navigator.of(context).pop();
|
||||
}),
|
||||
SizedBox(height: 16.h),
|
||||
checkInOptionCard(
|
||||
AppAssets.whatsapp,
|
||||
LocaleKeys.preferredConsultationLanguageEn.tr(),
|
||||
LocaleKeys.viewNearestHMGLocations.tr(),
|
||||
).onPress(() async {
|
||||
immediateLiveCareViewModel.setSelectedConsultationLanguage(2);
|
||||
Navigator.of(context).pop();
|
||||
}),
|
||||
SizedBox(height: 16.h),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Widget checkInOptionCard(String icon, String title, String subTitle) {
|
||||
return Container(
|
||||
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
|
||||
color: AppColors.whiteColor,
|
||||
borderRadius: 20.r,
|
||||
hasShadow: false,
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Utils.buildSvgWithAssets(icon: icon, width: 24.h, height: 24.h, fit: BoxFit.fill, applyThemeColor: false),
|
||||
SizedBox(height: 16.h),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
title.toText16(isBold: true, color: AppColors.textColor),
|
||||
// subTitle.toText12(isBold: true, color: AppColors.greyTextColor),
|
||||
],
|
||||
),
|
||||
),
|
||||
Transform.flip(
|
||||
flipX: appState.isArabic(),
|
||||
child: Utils.buildSvgWithAssets(
|
||||
icon: AppAssets.forward_arrow_icon_small,
|
||||
iconColor: AppColors.blackColor,
|
||||
width: 18.h,
|
||||
height: 13.h,
|
||||
fit: BoxFit.contain,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
).paddingAll(16.h),
|
||||
);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue