|
|
|
|
@ -12,6 +12,7 @@ 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/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:provider/provider.dart';
|
|
|
|
|
|
|
|
|
|
@ -25,55 +26,61 @@ class FeedbackPage extends StatelessWidget {
|
|
|
|
|
contactUsViewModel = Provider.of<ContactUsViewModel>(context);
|
|
|
|
|
return Scaffold(
|
|
|
|
|
backgroundColor: AppColors.bgScaffoldColor,
|
|
|
|
|
body: Column(
|
|
|
|
|
children: [
|
|
|
|
|
Expanded(
|
|
|
|
|
child: CollapsingListView(
|
|
|
|
|
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),
|
|
|
|
|
],
|
|
|
|
|
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,
|
|
|
|
|
borderRadius: 24.h,
|
|
|
|
|
hasShadow: true,
|
|
|
|
|
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 {},
|
|
|
|
|
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),
|
|
|
|
|
),
|
|
|
|
|
child: CustomButton(
|
|
|
|
|
text: LocaleKeys.submit.tr(context: context),
|
|
|
|
|
onPressed: () async {},
|
|
|
|
|
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),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
);
|
|
|
|
|
}),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -87,7 +94,7 @@ class FeedbackPage extends StatelessWidget {
|
|
|
|
|
Container(
|
|
|
|
|
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
|
|
|
|
|
color: AppColors.whiteColor,
|
|
|
|
|
borderRadius: 24.h,
|
|
|
|
|
borderRadius: 16.r,
|
|
|
|
|
hasShadow: false,
|
|
|
|
|
),
|
|
|
|
|
child: Padding(
|
|
|
|
|
@ -124,12 +131,28 @@ class FeedbackPage extends StatelessWidget {
|
|
|
|
|
SizedBox(height: 16.h),
|
|
|
|
|
TextInputWidget(
|
|
|
|
|
labelText: "Subject".needTranslation,
|
|
|
|
|
hintText: "Type subject here".needTranslation,
|
|
|
|
|
hintText: "Enter subject here".needTranslation,
|
|
|
|
|
// controller: searchEditingController,
|
|
|
|
|
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: searchEditingController,
|
|
|
|
|
isEnable: true,
|
|
|
|
|
prefix: null,
|
|
|
|
|
autoFocus: false,
|
|
|
|
|
isBorderAllowed: false,
|
|
|
|
|
isMultiline: true,
|
|
|
|
|
keyboardType: TextInputType.text,
|
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
|
vertical: ResponsiveExtension(10).h,
|
|
|
|
|
@ -137,6 +160,35 @@ class FeedbackPage extends StatelessWidget {
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
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);
|
|
|
|
|
// setState(() {
|
|
|
|
|
// EReferralAttachment eReferralAttachment = new EReferralAttachment(fileName: 'image ${medicalReportImages.length + 1}.png', base64String: image);
|
|
|
|
|
// medicalReportImages.add(eReferralAttachment);
|
|
|
|
|
// });
|
|
|
|
|
},
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
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,
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
);
|
|
|
|
|
} else {
|
|
|
|
|
|