Merge branch 'master' into faiz_dev
# Conflicts: # lib/features/location/location_view_model.dartpull/113/head
commit
5e437e42a9
@ -0,0 +1,11 @@
|
||||
class FeedbackType {
|
||||
final int id;
|
||||
final String nameEN;
|
||||
final String nameAR;
|
||||
|
||||
FeedbackType({
|
||||
required this.id,
|
||||
required this.nameEN,
|
||||
required this.nameAR,
|
||||
});
|
||||
}
|
||||
@ -0,0 +1,137 @@
|
||||
class RequestInsertCOCItem {
|
||||
bool? isUserLoggedIn;
|
||||
String? mobileNo;
|
||||
int? identificationNo;
|
||||
int? patientID;
|
||||
int? patientOutSA;
|
||||
int? patientTypeID;
|
||||
String? tokenID;
|
||||
String? patientName;
|
||||
int? projectID;
|
||||
String? fileName;
|
||||
String? attachment;
|
||||
String? uILanguage;
|
||||
String? browserInfo;
|
||||
String? cOCTypeName;
|
||||
String? formTypeID;
|
||||
String? details;
|
||||
String? deviceInfo;
|
||||
String? deviceType;
|
||||
String? title;
|
||||
String? resolution;
|
||||
double? versionID;
|
||||
int? channel;
|
||||
int? languageID;
|
||||
String? iPAdress;
|
||||
String? generalid;
|
||||
String? sessionID;
|
||||
bool? isDentalAllowedBackend;
|
||||
int? deviceTypeID;
|
||||
int? patientType;
|
||||
double? appVersion;
|
||||
bool? forDemo;
|
||||
|
||||
RequestInsertCOCItem(
|
||||
{this.isUserLoggedIn,
|
||||
this.mobileNo,
|
||||
this.identificationNo,
|
||||
this.patientID,
|
||||
this.patientOutSA,
|
||||
this.patientTypeID,
|
||||
this.tokenID,
|
||||
this.patientName,
|
||||
this.projectID,
|
||||
this.fileName,
|
||||
this.attachment,
|
||||
this.uILanguage,
|
||||
this.browserInfo,
|
||||
this.cOCTypeName,
|
||||
this.formTypeID,
|
||||
this.details,
|
||||
this.deviceInfo,
|
||||
this.deviceType,
|
||||
this.title,
|
||||
this.resolution,
|
||||
this.versionID,
|
||||
this.channel,
|
||||
this.languageID,
|
||||
this.iPAdress,
|
||||
this.generalid,
|
||||
this.sessionID,
|
||||
this.isDentalAllowedBackend,
|
||||
this.deviceTypeID,
|
||||
this.patientType,
|
||||
this.appVersion,
|
||||
this.forDemo});
|
||||
|
||||
RequestInsertCOCItem.fromJson(Map<String, dynamic> json) {
|
||||
isUserLoggedIn = json['IsUserLoggedIn'];
|
||||
mobileNo = json['MobileNo'];
|
||||
identificationNo = json['IdentificationNo'];
|
||||
patientID = json['PatientID'];
|
||||
patientOutSA = json['PatientOutSA'];
|
||||
patientTypeID = json['PatientTypeID'];
|
||||
tokenID = json['TokenID'];
|
||||
patientName = json['PatientName'];
|
||||
projectID = json['ProjectID'];
|
||||
fileName = json['FileName'];
|
||||
attachment = json['Attachment'];
|
||||
uILanguage = json['UILanguage'];
|
||||
browserInfo = json['BrowserInfo'];
|
||||
cOCTypeName = json['COCTypeName'];
|
||||
formTypeID = json['FormTypeID'];
|
||||
details = json['Details'];
|
||||
deviceInfo = json['DeviceInfo'];
|
||||
deviceType = json['DeviceType'];
|
||||
title = json['Title'];
|
||||
resolution = json['Resolution'];
|
||||
versionID = json['VersionID'];
|
||||
channel = json['Channel'];
|
||||
languageID = json['LanguageID'];
|
||||
iPAdress = json['IPAdress'];
|
||||
generalid = json['generalid'];
|
||||
sessionID = json['SessionID'];
|
||||
isDentalAllowedBackend = json['isDentalAllowedBackend'];
|
||||
deviceTypeID = json['DeviceTypeID'];
|
||||
patientType = json['PatientType'];
|
||||
appVersion = json['AppVersion'];
|
||||
forDemo = json['ForDemo'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['IsUserLoggedIn'] = this.isUserLoggedIn;
|
||||
data['MobileNo'] = this.mobileNo;
|
||||
data['IdentificationNo'] = this.identificationNo;
|
||||
data['PatientID'] = this.patientID;
|
||||
data['PatientOutSA'] = this.patientOutSA;
|
||||
data['PatientTypeID'] = this.patientTypeID;
|
||||
data['TokenID'] = this.tokenID;
|
||||
data['PatientName'] = this.patientName;
|
||||
data['ProjectID'] = this.projectID;
|
||||
data['FileName'] = this.fileName;
|
||||
data['Attachment'] = this.attachment;
|
||||
data['UILanguage'] = this.uILanguage;
|
||||
data['BrowserInfo'] = this.browserInfo;
|
||||
data['COCTypeName'] = this.cOCTypeName;
|
||||
data['FormTypeID'] = this.formTypeID;
|
||||
data['Details'] = this.details;
|
||||
data['DeviceInfo'] = this.deviceInfo;
|
||||
data['DeviceType'] = this.deviceType;
|
||||
data['Title'] = this.title;
|
||||
data['Resolution'] = this.resolution;
|
||||
data['VersionID'] = this.versionID;
|
||||
data['Channel'] = this.channel;
|
||||
data['LanguageID'] = this.languageID;
|
||||
data['IPAdress'] = this.iPAdress;
|
||||
data['generalid'] = this.generalid;
|
||||
data['SessionID'] = this.sessionID;
|
||||
data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
|
||||
data['DeviceTypeID'] = this.deviceTypeID;
|
||||
data['PatientType'] = this.patientType;
|
||||
data['AppVersion'] = this.appVersion;
|
||||
data['ForDemo'] = this.forDemo;
|
||||
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,400 @@
|
||||
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/date_util.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/book_appointments/book_appointments_view_model.dart';
|
||||
import 'package:hmg_patient_app_new/features/contact_us/contact_us_view_model.dart';
|
||||
import 'package:hmg_patient_app_new/features/contact_us/models/feedback_type.dart';
|
||||
import 'package:hmg_patient_app_new/features/medical_file/medical_file_view_model.dart';
|
||||
import 'package:hmg_patient_app_new/features/my_appointments/my_appointments_view_model.dart';
|
||||
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
|
||||
import 'package:hmg_patient_app_new/presentation/appointments/widgets/appointment_card.dart';
|
||||
import 'package:hmg_patient_app_new/presentation/contact_us/widgets/feedback_appointment_selection.dart';
|
||||
import 'package:hmg_patient_app_new/theme/colors.dart';
|
||||
import 'package:hmg_patient_app_new/widgets/appbar/collapsing_list_view.dart';
|
||||
import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart';
|
||||
import 'package:hmg_patient_app_new/widgets/chip/app_custom_chip_widget.dart';
|
||||
import 'package:hmg_patient_app_new/widgets/common_bottom_sheet.dart';
|
||||
import 'package:hmg_patient_app_new/widgets/custom_tab_bar.dart';
|
||||
import 'package:hmg_patient_app_new/widgets/image_picker.dart';
|
||||
import 'package:hmg_patient_app_new/widgets/input_widget.dart';
|
||||
import 'package:hmg_patient_app_new/widgets/loader/bottomsheet_loader.dart';
|
||||
import 'package:hmg_patient_app_new/widgets/routes/custom_page_route.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class FeedbackPage extends StatelessWidget {
|
||||
FeedbackPage({super.key});
|
||||
|
||||
late ContactUsViewModel contactUsViewModel;
|
||||
late MedicalFileViewModel medicalFileViewModel;
|
||||
|
||||
final TextEditingController subjectTextController = TextEditingController();
|
||||
final TextEditingController messageTextController = TextEditingController();
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
contactUsViewModel = Provider.of<ContactUsViewModel>(context, listen: false);
|
||||
medicalFileViewModel = Provider.of<MedicalFileViewModel>(context, listen: false);
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.bgScaffoldColor,
|
||||
body: Consumer<ContactUsViewModel>(builder: (context, contactUsVM, child) {
|
||||
return Column(
|
||||
children: [
|
||||
Expanded(
|
||||
child: CollapsingListView(
|
||||
isLeading: Navigator.canPop(context),
|
||||
title: LocaleKeys.feedback.tr(),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
SizedBox(height: 16.h),
|
||||
CustomTabBar(
|
||||
activeTextColor: AppColors.primaryRedColor,
|
||||
activeBackgroundColor: AppColors.primaryRedColor.withValues(alpha: .1),
|
||||
tabs: [
|
||||
CustomTabBarModel(null, "Send".needTranslation),
|
||||
CustomTabBarModel(null, "Status".needTranslation),
|
||||
],
|
||||
onTabChange: (index) {
|
||||
contactUsViewModel.setIsSendFeedbackTabSelected(index == 0);
|
||||
},
|
||||
).paddingSymmetrical(24.h, 0.h),
|
||||
getSelectedTabWidget(context).paddingSymmetrical(24.h, 16.w),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
|
||||
color: AppColors.whiteColor,
|
||||
customBorder: BorderRadius.only(
|
||||
topLeft: Radius.circular(24.h),
|
||||
topRight: Radius.circular(24.h),
|
||||
),
|
||||
hasShadow: true,
|
||||
),
|
||||
child: CustomButton(
|
||||
text: LocaleKeys.submit.tr(context: context),
|
||||
onPressed: () async {
|
||||
if (subjectTextController.text.isEmpty) {
|
||||
showCommonBottomSheetWithoutHeight(
|
||||
context,
|
||||
child: Utils.getErrorWidget(loadingText: LocaleKeys.emptySubject.tr(context: context)),
|
||||
);
|
||||
return;
|
||||
}
|
||||
if (messageTextController.text.isEmpty) {
|
||||
showCommonBottomSheetWithoutHeight(
|
||||
context,
|
||||
child: Utils.getErrorWidget(loadingText: LocaleKeys.emptyMessage.tr(context: context)),
|
||||
);
|
||||
return;
|
||||
}
|
||||
LoaderBottomSheet.showLoader(loadingText: "Sending Feedback...".needTranslation);
|
||||
contactUsViewModel.insertCOCItem(
|
||||
subject: subjectTextController.text,
|
||||
message: messageTextController.text,
|
||||
onSuccess: (val) {
|
||||
LoaderBottomSheet.hideLoader();
|
||||
subjectTextController.clear();
|
||||
messageTextController.clear();
|
||||
contactUsViewModel.setPatientFeedbackSelectedAppointment(null);
|
||||
showCommonBottomSheetWithoutHeight(context, child: Utils.getSuccessWidget(loadingText: LocaleKeys.success.tr(context: context)), callBackFunc: () {
|
||||
Navigator.pop(context);
|
||||
});
|
||||
},
|
||||
onError: (err) {
|
||||
LoaderBottomSheet.hideLoader();
|
||||
showCommonBottomSheetWithoutHeight(
|
||||
context,
|
||||
child: Utils.getSuccessWidget(loadingText: err),
|
||||
);
|
||||
});
|
||||
},
|
||||
backgroundColor: AppColors.primaryRedColor,
|
||||
borderColor: AppColors.primaryRedColor,
|
||||
textColor: AppColors.whiteColor,
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w500,
|
||||
borderRadius: 12,
|
||||
padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
|
||||
height: 50.h,
|
||||
icon: AppAssets.feedback,
|
||||
iconColor: AppColors.whiteColor,
|
||||
iconSize: 20.h,
|
||||
).paddingSymmetrical(24.h, 24.h),
|
||||
),
|
||||
],
|
||||
);
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
Widget getSelectedTabWidget(BuildContext context) {
|
||||
if (contactUsViewModel.isSendFeedbackTabSelected) {
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
LocaleKeys.likeToHear.tr().toText14(weight: FontWeight.w500),
|
||||
SizedBox(height: 16.h),
|
||||
Container(
|
||||
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
|
||||
color: AppColors.whiteColor,
|
||||
borderRadius: 16.r,
|
||||
hasShadow: false,
|
||||
),
|
||||
child: Padding(
|
||||
padding: EdgeInsets.all(16.h),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Utils.buildSvgWithAssets(icon: AppAssets.ask_doctor_icon, width: 24.w, height: 24.h, iconColor: AppColors.greyTextColor),
|
||||
SizedBox(width: 12.w),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
LocaleKeys.feedbackType.tr().toText16(color: AppColors.textColor, weight: FontWeight.w500),
|
||||
(getIt.get<AppState>().isArabic() ? contactUsViewModel.selectedFeedbackType.nameAR : contactUsViewModel.selectedFeedbackType.nameEN)
|
||||
.toText14(color: AppColors.greyTextColor, weight: FontWeight.w500),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
Utils.buildSvgWithAssets(icon: AppAssets.arrow_down, width: 25.h, height: 25.h),
|
||||
],
|
||||
).onPress(() {
|
||||
showCommonBottomSheetWithoutHeight(context,
|
||||
title: "Select Feedback Type".needTranslation,
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 24),
|
||||
child: ListView.builder(
|
||||
itemCount: contactUsViewModel.feedbackTypeList.length,
|
||||
physics: NeverScrollableScrollPhysics(),
|
||||
padding: EdgeInsets.only(top: 8, bottom: 8),
|
||||
shrinkWrap: true,
|
||||
itemBuilder: (innerContext, index) {
|
||||
return Theme(
|
||||
data: Theme.of(context).copyWith(
|
||||
listTileTheme: ListTileThemeData(horizontalTitleGap: 4),
|
||||
),
|
||||
child: RadioListTile<FeedbackType>(
|
||||
title: Text(
|
||||
getIt.get<AppState>().isArabic() ? contactUsViewModel.feedbackTypeList[index].nameAR : contactUsViewModel.feedbackTypeList[index].nameEN,
|
||||
style: TextStyle(
|
||||
fontSize: 16.h,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
value: contactUsViewModel.feedbackTypeList[index],
|
||||
fillColor: WidgetStateProperty.resolveWith((states) {
|
||||
if (states.contains(WidgetState.selected)) {
|
||||
return AppColors.primaryRedColor;
|
||||
}
|
||||
return Color(0xffEEEEEE);
|
||||
}),
|
||||
contentPadding: EdgeInsets.only(left: 12.h, right: 12.h),
|
||||
groupValue: contactUsViewModel.selectedFeedbackType,
|
||||
onChanged: (FeedbackType? newValue) async {
|
||||
Navigator.pop(context);
|
||||
contactUsViewModel.setSelectedFeedbackType(newValue!);
|
||||
if (contactUsViewModel.selectedFeedbackType.id == 1) {
|
||||
LoaderBottomSheet.showLoader(loadingText: "Loading appointments list...".needTranslation);
|
||||
await medicalFileViewModel.getPatientMedicalReportAppointmentsList(onSuccess: (val) async {
|
||||
LoaderBottomSheet.hideLoader();
|
||||
bool? value = await Navigator.of(context).push(
|
||||
CustomPageRoute(
|
||||
page: FeedbackAppointmentSelection(),
|
||||
fullScreenDialog: true,
|
||||
direction: AxisDirection.down,
|
||||
),
|
||||
);
|
||||
if (value != null) {
|
||||
// showConfirmRequestMedicalReportBottomSheet();
|
||||
}
|
||||
}, onError: (err) {
|
||||
LoaderBottomSheet.hideLoader();
|
||||
showCommonBottomSheetWithoutHeight(
|
||||
context,
|
||||
child: Utils.getErrorWidget(loadingText: "You do not have any appointments to submit a feedback.".needTranslation),
|
||||
callBackFunc: () {},
|
||||
isFullScreen: false,
|
||||
isCloseButtonVisible: true,
|
||||
);
|
||||
});
|
||||
} else {
|
||||
contactUsViewModel.setPatientFeedbackSelectedAppointment(null);
|
||||
}
|
||||
},
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
callBackFunc: () {},
|
||||
isFullScreen: false,
|
||||
isCloseButtonVisible: true);
|
||||
}),
|
||||
]),
|
||||
),
|
||||
),
|
||||
if (contactUsViewModel.patientFeedbackSelectedAppointment != null) ...[
|
||||
SizedBox(height: 16.h),
|
||||
"Selected Appointment:".needTranslation.toText16(isBold: true),
|
||||
SizedBox(height: 8.h),
|
||||
Container(
|
||||
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
|
||||
color: AppColors.whiteColor,
|
||||
borderRadius: 20.r,
|
||||
hasShadow: false,
|
||||
),
|
||||
padding: EdgeInsets.all(16.h),
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Image.network(
|
||||
contactUsViewModel.patientFeedbackSelectedAppointment!.doctorImageURL!,
|
||||
width: 63.h,
|
||||
height: 63.h,
|
||||
fit: BoxFit.cover,
|
||||
).circle(100).toShimmer2(isShow: false),
|
||||
SizedBox(width: 16.h),
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
(contactUsViewModel.patientFeedbackSelectedAppointment!.doctorNameObj!).toText16(isBold: true, maxlines: 1).toShimmer2(isShow: false),
|
||||
SizedBox(height: 8.h),
|
||||
Wrap(
|
||||
direction: Axis.horizontal,
|
||||
spacing: 3.h,
|
||||
runSpacing: 4.h,
|
||||
children: [
|
||||
AppCustomChipWidget(labelText: contactUsViewModel.patientFeedbackSelectedAppointment!.clinicName!).toShimmer2(isShow: false),
|
||||
AppCustomChipWidget(labelText: contactUsViewModel.patientFeedbackSelectedAppointment!.projectName!).toShimmer2(isShow: false),
|
||||
AppCustomChipWidget(
|
||||
icon: AppAssets.appointment_calendar_icon,
|
||||
labelText: DateUtil.formatDateToDate(DateUtil.convertStringToDate(contactUsViewModel.patientFeedbackSelectedAppointment!.appointmentDate), false),
|
||||
).toShimmer2(isShow: false),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
SizedBox(height: 16.h),
|
||||
TextInputWidget(
|
||||
labelText: "Subject".needTranslation,
|
||||
hintText: "Enter subject here".needTranslation,
|
||||
controller: subjectTextController,
|
||||
isEnable: true,
|
||||
prefix: null,
|
||||
autoFocus: false,
|
||||
isBorderAllowed: false,
|
||||
keyboardType: TextInputType.text,
|
||||
padding: EdgeInsets.symmetric(
|
||||
vertical: ResponsiveExtension(10).h,
|
||||
horizontal: ResponsiveExtension(15).h,
|
||||
),
|
||||
),
|
||||
SizedBox(height: 16.h),
|
||||
TextInputWidget(
|
||||
labelText: "Message".needTranslation,
|
||||
hintText: "Enter message here".needTranslation,
|
||||
controller: messageTextController,
|
||||
isEnable: true,
|
||||
prefix: null,
|
||||
autoFocus: false,
|
||||
isBorderAllowed: false,
|
||||
isMultiline: true,
|
||||
keyboardType: TextInputType.text,
|
||||
padding: EdgeInsets.symmetric(
|
||||
vertical: ResponsiveExtension(10).h,
|
||||
horizontal: ResponsiveExtension(15).h,
|
||||
),
|
||||
),
|
||||
SizedBox(height: 16.h),
|
||||
CustomButton(
|
||||
text: LocaleKeys.selectAttachment.tr(context: context),
|
||||
onPressed: () async {
|
||||
ImageOptions.showImageOptionsNew(
|
||||
context,
|
||||
true,
|
||||
(String image, file) {
|
||||
print(image);
|
||||
print(file);
|
||||
Navigator.pop(context);
|
||||
contactUsViewModel.addFeedbackAttachment(image);
|
||||
},
|
||||
);
|
||||
},
|
||||
backgroundColor: AppColors.secondaryLightRedColor,
|
||||
borderColor: AppColors.secondaryLightRedColor,
|
||||
textColor: AppColors.primaryRedColor,
|
||||
fontSize: 14.f,
|
||||
fontWeight: FontWeight.w500,
|
||||
borderRadius: 10.r,
|
||||
padding: EdgeInsets.symmetric(horizontal: 10.w),
|
||||
height: isTablet || isFoldable ? 46.h : 40.h,
|
||||
icon: AppAssets.file_icon,
|
||||
iconColor: AppColors.primaryRedColor,
|
||||
iconSize: 16.h,
|
||||
),
|
||||
SizedBox(height: 16.h),
|
||||
contactUsViewModel.feedbackAttachmentList.isNotEmpty
|
||||
? Container(
|
||||
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
|
||||
color: AppColors.whiteColor,
|
||||
borderRadius: 12.r,
|
||||
hasShadow: false,
|
||||
),
|
||||
child: ListView.builder(
|
||||
padding: EdgeInsets.all(16.h),
|
||||
shrinkWrap: true,
|
||||
itemCount: contactUsViewModel.feedbackAttachmentList.length,
|
||||
itemBuilder: (BuildContext context, int index) {
|
||||
return Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Icon(
|
||||
Icons.attach_file,
|
||||
color: Color(0xff2B353E),
|
||||
),
|
||||
SizedBox(width: 8.w),
|
||||
"Image ${index + 1}".toText14().paddingOnly(bottom: 8.h),
|
||||
],
|
||||
),
|
||||
Utils.buildSvgWithAssets(icon: AppAssets.cancel_circle_icon).onPress(() {
|
||||
contactUsViewModel.removeFeedbackAttachment(contactUsViewModel.feedbackAttachmentList[index]);
|
||||
}),
|
||||
],
|
||||
);
|
||||
},
|
||||
),
|
||||
)
|
||||
: SizedBox.shrink(),
|
||||
],
|
||||
);
|
||||
} else {
|
||||
return Container();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,27 +1,176 @@
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_staggered_animations/flutter_staggered_animations.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/contact_us/contact_us_view_model.dart';
|
||||
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
|
||||
import 'package:hmg_patient_app_new/theme/colors.dart';
|
||||
import 'package:hmg_patient_app_new/widgets/appbar/collapsing_list_view.dart';
|
||||
import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart';
|
||||
import 'package:hmg_patient_app_new/widgets/chip/app_custom_chip_widget.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
|
||||
class LiveChatPage extends StatelessWidget {
|
||||
const LiveChatPage({super.key});
|
||||
LiveChatPage({super.key});
|
||||
|
||||
String chatURL = "";
|
||||
|
||||
late AppState appState;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
appState = getIt.get<AppState>();
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.bgScaffoldColor,
|
||||
body: Column(
|
||||
children: [
|
||||
Expanded(
|
||||
child: CollapsingListView(
|
||||
title: LocaleKeys.liveChat.tr(),
|
||||
child: SingleChildScrollView(),
|
||||
body: Consumer<ContactUsViewModel>(builder: (context, contactUsVM, child) {
|
||||
return Column(
|
||||
children: [
|
||||
Expanded(
|
||||
child: CollapsingListView(
|
||||
title: LocaleKeys.liveChat.tr(),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
SizedBox(height: 16.h),
|
||||
ListView.separated(
|
||||
padding: EdgeInsets.only(top: 16.h),
|
||||
shrinkWrap: true,
|
||||
physics: NeverScrollableScrollPhysics(),
|
||||
itemCount: contactUsVM.isLiveChatProjectsListLoading ? 5 : contactUsVM.liveChatProjectsList.length,
|
||||
itemBuilder: (context, index) {
|
||||
return contactUsVM.isLiveChatProjectsListLoading
|
||||
? Container(
|
||||
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 24.h, hasShadow: true),
|
||||
child: Container(
|
||||
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
|
||||
color: AppColors.whiteColor,
|
||||
borderRadius: 20.h,
|
||||
hasShadow: true,
|
||||
),
|
||||
child: Padding(
|
||||
padding: EdgeInsets.all(14.h),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Image.network(
|
||||
"https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown_female.png",
|
||||
width: 63.h,
|
||||
height: 63.h,
|
||||
fit: BoxFit.cover,
|
||||
).circle(100).toShimmer2(isShow: true),
|
||||
SizedBox(width: 16.h),
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
"Dr John Smith".toText16(isBold: true).toShimmer2(isShow: true),
|
||||
SizedBox(height: 8.h),
|
||||
Wrap(
|
||||
direction: Axis.horizontal,
|
||||
spacing: 3.h,
|
||||
runSpacing: 4.h,
|
||||
children: [
|
||||
AppCustomChipWidget(labelText: "").toShimmer2(isShow: true, width: 16.h),
|
||||
AppCustomChipWidget(labelText: "").toShimmer2(isShow: true, width: 16.h),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
).paddingSymmetrical(24.h, 0.h)
|
||||
: AnimationConfiguration.staggeredList(
|
||||
position: index,
|
||||
duration: const Duration(milliseconds: 500),
|
||||
child: SlideAnimation(
|
||||
verticalOffset: 100.0,
|
||||
child: FadeInAnimation(
|
||||
child: AnimatedContainer(
|
||||
duration: Duration(milliseconds: 300),
|
||||
curve: Curves.easeInOut,
|
||||
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 24.h, hasShadow: true),
|
||||
child: DecoratedBox(
|
||||
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
|
||||
color: contactUsVM.selectedLiveChatProjectIndex == index ? AppColors.primaryRedColor : AppColors.whiteColor,
|
||||
borderRadius: 16.r,
|
||||
hasShadow: false,
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
("${appState.isArabic() ? contactUsVM.liveChatProjectsList[index].projectNameN! : contactUsVM.liveChatProjectsList[index].projectName!}\n${contactUsVM.liveChatProjectsList[index].distanceInKilometers!} KM")
|
||||
.needTranslation
|
||||
.toText14(isBold: true, color: contactUsVM.selectedLiveChatProjectIndex == index ? AppColors.whiteColor : AppColors.textColor),
|
||||
Transform.flip(
|
||||
flipX: getIt.get<AppState>().isArabic(),
|
||||
child: Utils.buildSvgWithAssets(
|
||||
icon: AppAssets.forward_arrow_icon_small,
|
||||
iconColor: contactUsVM.selectedLiveChatProjectIndex == index ? AppColors.whiteColor : AppColors.textColor,
|
||||
width: 18.h,
|
||||
height: 13.h,
|
||||
fit: BoxFit.contain,
|
||||
),
|
||||
),
|
||||
],
|
||||
).paddingSymmetrical(16.h, 16.h),
|
||||
).onPress(() {
|
||||
contactUsVM.setSelectedLiveChatProjectIndex(index);
|
||||
chatURL =
|
||||
"https://chat.hmg.com/Index.aspx?Name=${appState.getAuthenticatedUser()!.firstName}&PatientID=${appState.getAuthenticatedUser()!.patientId}&MobileNo=${appState.getAuthenticatedUser()!.mobileNumber}&Language=${appState.isArabic() ? 'ar' : 'en'}&WorkGroup=${contactUsVM.liveChatProjectsList[index].value}";
|
||||
debugPrint("Chat URL: $chatURL");
|
||||
}),
|
||||
).paddingSymmetrical(24.h, 0.h),
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
separatorBuilder: (BuildContext cxt, int index) => SizedBox(height: 16.h),
|
||||
),
|
||||
SizedBox(height: 24.h),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
|
||||
color: AppColors.whiteColor,
|
||||
borderRadius: 24.h,
|
||||
hasShadow: true,
|
||||
),
|
||||
child: CustomButton(
|
||||
text: LocaleKeys.liveChat.tr(context: context),
|
||||
onPressed: () async {
|
||||
Uri uri = Uri.parse(chatURL);
|
||||
launchUrl(uri, mode: LaunchMode.platformDefault, webOnlyWindowName: "");
|
||||
},
|
||||
backgroundColor: contactUsVM.selectedLiveChatProjectIndex == -1 ? AppColors.greyColor : AppColors.primaryRedColor,
|
||||
borderColor: contactUsVM.selectedLiveChatProjectIndex == -1 ? AppColors.greyColor : AppColors.primaryRedColor,
|
||||
textColor: AppColors.whiteColor,
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w500,
|
||||
borderRadius: 12,
|
||||
padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
|
||||
height: 50.h,
|
||||
).paddingSymmetrical(24.h, 24.h),
|
||||
),
|
||||
),
|
||||
Container()
|
||||
],
|
||||
),
|
||||
],
|
||||
);
|
||||
}),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,70 @@
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_staggered_animations/flutter_staggered_animations.dart';
|
||||
import 'package:hmg_patient_app_new/core/utils/size_utils.dart';
|
||||
import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
|
||||
import 'package:hmg_patient_app_new/features/book_appointments/book_appointments_view_model.dart';
|
||||
import 'package:hmg_patient_app_new/features/contact_us/contact_us_view_model.dart';
|
||||
import 'package:hmg_patient_app_new/features/medical_file/medical_file_view_model.dart';
|
||||
import 'package:hmg_patient_app_new/features/my_appointments/my_appointments_view_model.dart';
|
||||
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
|
||||
import 'package:hmg_patient_app_new/presentation/appointments/widgets/appointment_card.dart';
|
||||
import 'package:hmg_patient_app_new/theme/colors.dart';
|
||||
import 'package:hmg_patient_app_new/widgets/appbar/collapsing_list_view.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class FeedbackAppointmentSelection extends StatelessWidget {
|
||||
FeedbackAppointmentSelection({super.key});
|
||||
|
||||
late MedicalFileViewModel medicalFileViewModel;
|
||||
late ContactUsViewModel contactUsViewModel;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
medicalFileViewModel = Provider.of<MedicalFileViewModel>(context, listen: false);
|
||||
contactUsViewModel = Provider.of<ContactUsViewModel>(context, listen: false);
|
||||
return CollapsingListView(
|
||||
title: LocaleKeys.feedback.tr(),
|
||||
isClose: true,
|
||||
child: Column(
|
||||
children: [
|
||||
ListView.separated(
|
||||
padding: EdgeInsets.only(top: 24.h),
|
||||
shrinkWrap: true,
|
||||
physics: NeverScrollableScrollPhysics(),
|
||||
itemCount: medicalFileViewModel.patientMedicalReportAppointmentHistoryList.length,
|
||||
itemBuilder: (context, index) {
|
||||
return AnimationConfiguration.staggeredList(
|
||||
position: index,
|
||||
duration: const Duration(milliseconds: 500),
|
||||
child: SlideAnimation(
|
||||
verticalOffset: 100.0,
|
||||
child: FadeInAnimation(
|
||||
child: AnimatedContainer(
|
||||
duration: Duration(milliseconds: 300),
|
||||
curve: Curves.easeInOut,
|
||||
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 24.h, hasShadow: true),
|
||||
child: AppointmentCard(
|
||||
patientAppointmentHistoryResponseModel: medicalFileViewModel.patientMedicalReportAppointmentHistoryList[index],
|
||||
myAppointmentsViewModel: Provider.of<MyAppointmentsViewModel>(context, listen: false),
|
||||
bookAppointmentsViewModel: Provider.of<BookAppointmentsViewModel>(context, listen: false),
|
||||
medicalFileViewModel: medicalFileViewModel,
|
||||
contactUsViewModel: contactUsViewModel,
|
||||
isLoading: false,
|
||||
isFromHomePage: false,
|
||||
isFromMedicalReport: true,
|
||||
isForFeedback: true,
|
||||
),
|
||||
).paddingSymmetrical(24.h, 0.h),
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
separatorBuilder: (BuildContext cxt, int index) => SizedBox(height: 16.h),
|
||||
),
|
||||
SizedBox(height: 24.h),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@ -0,0 +1,245 @@
|
||||
import 'dart:io';
|
||||
|
||||
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_export.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/emergency_services/emergency_services_view_model.dart';
|
||||
import 'package:hmg_patient_app_new/features/emergency_services/models/AmbulanceCallingPlace.dart';
|
||||
import 'package:hmg_patient_app_new/features/location/GeocodeResponse.dart';
|
||||
import 'package:hmg_patient_app_new/features/location/PlaceDetails.dart';
|
||||
import 'package:hmg_patient_app_new/features/location/PlacePrediction.dart';
|
||||
import 'package:hmg_patient_app_new/features/location/location_view_model.dart';
|
||||
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
|
||||
import 'package:hmg_patient_app_new/presentation/appointments/widgets/appointment_doctor_card.dart';
|
||||
import 'package:hmg_patient_app_new/presentation/emergency_services/call_ambulance/widgets/AddressItem.dart';
|
||||
import 'package:hmg_patient_app_new/presentation/emergency_services/call_ambulance/widgets/HospitalBottomSheetBody.dart';
|
||||
import 'package:hmg_patient_app_new/presentation/emergency_services/call_ambulance/widgets/appointment_bottom_sheet.dart' show AppointmentBottomSheet;
|
||||
import 'package:hmg_patient_app_new/presentation/emergency_services/widgets/location_input_bottom_sheet.dart';
|
||||
import 'package:hmg_patient_app_new/theme/colors.dart';
|
||||
import 'package:hmg_patient_app_new/widgets/CustomSwitch.dart';
|
||||
import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart';
|
||||
import 'package:hmg_patient_app_new/widgets/expandable_bottom_sheet/ExpandableBottomSheet.dart';
|
||||
import 'package:hmg_patient_app_new/widgets/expandable_bottom_sheet/model/BottomSheetType.dart';
|
||||
import 'package:hmg_patient_app_new/widgets/input_widget.dart';
|
||||
import 'package:hmg_patient_app_new/widgets/map/HMSMap.dart';
|
||||
import 'package:hmg_patient_app_new/widgets/map/gms_map.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
import '../../../widgets/common_bottom_sheet.dart';
|
||||
|
||||
/// screen to be used to get the location desired by the user
|
||||
/// to place the values in the request.
|
||||
/// [confirmButtonString] button text that will be displayed on the button
|
||||
/// [titleString] bottom sheet title
|
||||
/// [subTitleString] bottom sheet subtitle for details
|
||||
/// [onCrossClicked] if something has to be done if the user close the screen
|
||||
/// [isGmsAvailable] shows if the device that is running the application is GMS or HMS
|
||||
///
|
||||
/// it results [true] if the user clicks on the submit button
|
||||
/// and [false] if the user closes the screen without giving the consent to proceed for the request
|
||||
class MapUtilityScreen extends StatelessWidget {
|
||||
|
||||
final String confirmButtonString;
|
||||
final String titleString;
|
||||
final String subTitleString;
|
||||
final bool isGmsAvailable;
|
||||
final VoidCallback? onCrossClicked;
|
||||
|
||||
const MapUtilityScreen({super.key, required this.confirmButtonString, required this.titleString, required this.subTitleString, required this.isGmsAvailable, this.onCrossClicked});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
floatingActionButton: Padding(
|
||||
padding: EdgeInsetsDirectional.only(end: 8.h, bottom: 68.h),
|
||||
child: DecoratedBox(
|
||||
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
|
||||
color: AppColors.whiteColor, borderRadius: 12.h),
|
||||
child: Utils.buildSvgWithAssets(
|
||||
icon: AppAssets.locate_me, width: 24.h, height: 24.h)
|
||||
.paddingAll(12.h)
|
||||
.onPress(() {
|
||||
context
|
||||
.read<LocationViewModel>()
|
||||
.moveToCurrentLocation();
|
||||
}),
|
||||
),
|
||||
),
|
||||
bottomSheet: FixedBottomSheet(context),
|
||||
body: Stack(
|
||||
children: [
|
||||
if (isGmsAvailable)
|
||||
GMSMap(
|
||||
currentLocation:
|
||||
context.read<LocationViewModel>().getGMSLocation(),
|
||||
onCameraMoved: (value) => context
|
||||
.read<LocationViewModel>()
|
||||
.handleGMSMapCameraMoved(value),
|
||||
onCameraIdle:
|
||||
context.read<LocationViewModel>().handleOnCameraIdle,
|
||||
myLocationEnabled: true,
|
||||
inputController:
|
||||
context.read<LocationViewModel>().gmsController,
|
||||
showCenterMarker: true,
|
||||
)
|
||||
else
|
||||
HMSMap(
|
||||
currentLocation:
|
||||
context.read<LocationViewModel>().getHMSLocation(),
|
||||
onCameraMoved: (value) => context
|
||||
.read<LocationViewModel>()
|
||||
.handleHMSMapCameraMoved(value),
|
||||
onCameraIdle:
|
||||
context.read<LocationViewModel>().handleOnCameraIdle,
|
||||
myLocationEnabled: false,
|
||||
inputController:
|
||||
context.read<LocationViewModel>().hmsController,
|
||||
showCenterMarker: true,
|
||||
),
|
||||
Align(
|
||||
alignment: AlignmentDirectional.topStart,
|
||||
child: Utils.buildSvgWithAssets(
|
||||
icon: AppAssets.closeBottomNav, width: 32.h, height: 32.h)
|
||||
.onPress(() {
|
||||
onCrossClicked?.call();
|
||||
// context
|
||||
// .read<EmergencyServicesViewModel>()
|
||||
// .flushPickupInformation();
|
||||
|
||||
Navigator.pop(context, false);
|
||||
}),
|
||||
).paddingOnly(top: 51.h, left: 24.h),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget FixedBottomSheet(BuildContext context) {
|
||||
return GestureDetector(
|
||||
onVerticalDragUpdate: (details){
|
||||
},
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: [
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
spacing: 24.h,
|
||||
children: [
|
||||
inputFields(context).paddingSymmetrical(16.h, 0.h),
|
||||
SizedBox(
|
||||
child: DecoratedBox(
|
||||
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
|
||||
color: AppColors.scaffoldBgColor,
|
||||
customBorder: BorderRadius.only(
|
||||
topLeft: Radius.circular(24.h),
|
||||
topRight: Radius.circular(24.h),
|
||||
),
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
spacing: 24.h,
|
||||
children: [
|
||||
Column(
|
||||
spacing: 4.h,
|
||||
children: [
|
||||
titleString.toText21(
|
||||
weight: FontWeight.w600,
|
||||
color: AppColors.textColor,
|
||||
),
|
||||
subTitleString.needTranslation.toText12(
|
||||
fontWeight: FontWeight.w500,
|
||||
color: AppColors.greyTextColor,
|
||||
)
|
||||
],
|
||||
),
|
||||
CustomButton(
|
||||
text: confirmButtonString.needTranslation,
|
||||
onPressed: () {
|
||||
///indicates that the screen has resulted success and should be closed
|
||||
Navigator.pop(context,true);
|
||||
},
|
||||
)
|
||||
],
|
||||
).paddingOnly(top: 24.h, bottom: 32.h, left: 24.h, right: 24.h),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
leadingIcon(String leadingIcon) {
|
||||
return Container(
|
||||
height: 40.h,
|
||||
width: 40.h,
|
||||
margin: EdgeInsets.only(right: 10.h),
|
||||
padding: EdgeInsets.all(8.h),
|
||||
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
|
||||
borderRadius: 12.h,
|
||||
color: AppColors.greyColor,
|
||||
),
|
||||
child: Utils.buildSvgWithAssets(icon: leadingIcon),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
textPlaceInput(context) {
|
||||
return Consumer<LocationViewModel>(builder: (_, vm, __) {
|
||||
return SizedBox(
|
||||
width: MediaQuery.sizeOf(context).width,
|
||||
child: TextInputWidget(
|
||||
labelText: "Enter Pickup Location Manually".needTranslation,
|
||||
hintText: "Enter Pickup Location".needTranslation,
|
||||
controller: TextEditingController(
|
||||
text: vm.geocodeResponse?.results.first.formattedAddress ??
|
||||
vm.selectedPrediction?.description,
|
||||
),
|
||||
leadingIcon: AppAssets.location_pickup,
|
||||
isAllowLeadingIcon: true,
|
||||
isEnable: false,
|
||||
prefix: null,
|
||||
autoFocus: false,
|
||||
isBorderAllowed: false,
|
||||
keyboardType: TextInputType.text,
|
||||
padding: EdgeInsets.symmetric(
|
||||
vertical: ResponsiveExtension(10).h,
|
||||
horizontal: ResponsiveExtension(15).h,
|
||||
),
|
||||
).onPress(() {
|
||||
openLocationInputBottomSheet(context);
|
||||
}),
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
///decide which field to show first based on the selected calling place
|
||||
Widget inputFields(BuildContext context) {
|
||||
return textPlaceInput(context);
|
||||
}
|
||||
|
||||
openLocationInputBottomSheet(BuildContext context) {
|
||||
context.read<LocationViewModel>().flushSearchPredictions();
|
||||
showCommonBottomSheetWithoutHeight(
|
||||
title: "".needTranslation,
|
||||
context,
|
||||
child: SizedBox(
|
||||
height: MediaQuery.sizeOf(context).height * .8,
|
||||
child: LocationInputBottomSheet(),
|
||||
),
|
||||
isFullScreen: false,
|
||||
isCloseButtonVisible: true,
|
||||
hasBottomPadding: false,
|
||||
backgroundColor: AppColors.bottomSheetBgColor,
|
||||
callBackFunc: () {},
|
||||
);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue