|
|
|
|
@ -9,12 +9,14 @@ 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/route_extensions.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/prescriptions/models/resp_models/patient_prescriptions_response_model.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/features/prescriptions/prescriptions_view_model.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/presentation/prescriptions/prescription_item_view.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/services/dialog_service.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';
|
|
|
|
|
@ -237,7 +239,8 @@ class _PrescriptionDetailPageState extends State<PrescriptionDetailPage> {
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
Column(
|
|
|
|
|
children: [ Container(
|
|
|
|
|
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
|
|
|
|
|
color: AppColors.whiteColor,
|
|
|
|
|
borderRadius: 24.h,
|
|
|
|
|
@ -268,8 +271,55 @@ class _PrescriptionDetailPageState extends State<PrescriptionDetailPage> {
|
|
|
|
|
icon: AppAssets.prescription_refill_icon,
|
|
|
|
|
iconColor: widget.prescriptionsResponseModel.isHomeMedicineDeliverySupported! ? Colors.white : AppColors.textColor.withOpacity(0.35),
|
|
|
|
|
iconSize: 20.h,
|
|
|
|
|
).paddingSymmetrical(24.h, 24.h),
|
|
|
|
|
).paddingSymmetrical(24.h, 0.h),
|
|
|
|
|
),
|
|
|
|
|
Utils.havePrivilege(119) ? Container(
|
|
|
|
|
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
|
|
|
|
|
color: AppColors.whiteColor,
|
|
|
|
|
borderRadius: 24.h,
|
|
|
|
|
hasShadow: true,
|
|
|
|
|
),
|
|
|
|
|
child: Container(
|
|
|
|
|
height: 56.h,
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
borderRadius: BorderRadius.circular(12.r),
|
|
|
|
|
gradient: LinearGradient(
|
|
|
|
|
begin: Alignment.centerLeft,
|
|
|
|
|
end: Alignment.centerRight,
|
|
|
|
|
stops: [0.236, 1.0], // 53.6% and 100%
|
|
|
|
|
colors: [
|
|
|
|
|
Color(0xFF8A38F5), // Transparent
|
|
|
|
|
Color(0xFFE20BBB), // Solid #F8F8F8
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
child: Row(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
|
children: [
|
|
|
|
|
Padding(
|
|
|
|
|
padding: EdgeInsets.only(right: 4.w, left: 4.w),
|
|
|
|
|
child: Utils.buildSvgWithAssets(icon: AppAssets.aiOverView, width: 16.h, height: 16.h, iconColor: Colors.white),
|
|
|
|
|
),
|
|
|
|
|
LocaleKeys.generateAiAnalysisResult.tr(context: context).toText16(isBold: true, color: Colors.white)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
).paddingSymmetrical(24.h, 24.h).onPress(() async {
|
|
|
|
|
final _dialogService = getIt.get<DialogService>();
|
|
|
|
|
await _dialogService.showCommonBottomSheetWithoutH(
|
|
|
|
|
message: LocaleKeys.aiDisclaimer.tr(),
|
|
|
|
|
label: LocaleKeys.consent.tr(),
|
|
|
|
|
okLabel: LocaleKeys.acceptLbl.tr(),
|
|
|
|
|
cancelLabel: LocaleKeys.rejectView.tr(),
|
|
|
|
|
onOkPressed: () {
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
onCancelPressed: () {
|
|
|
|
|
context.pop();
|
|
|
|
|
});
|
|
|
|
|
}),
|
|
|
|
|
) : SizedBox(height: 24,) ,
|
|
|
|
|
])
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
|