prescription order implementation contd.
parent
1be430aa76
commit
b90883a596
@ -0,0 +1,88 @@
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:hmg_patient_app_new/core/utils/size_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/prescriptions/prescriptions_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:provider/provider.dart';
|
||||
|
||||
class PrescriptionDeliveryOrderSummaryPage extends StatelessWidget {
|
||||
PrescriptionDeliveryOrderSummaryPage({super.key});
|
||||
|
||||
late PrescriptionsViewModel prescriptionsViewModel;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
prescriptionsViewModel = Provider.of<PrescriptionsViewModel>(context, listen: false);
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.bgScaffoldColor,
|
||||
body: Column(
|
||||
children: [
|
||||
Expanded(
|
||||
child: CollapsingListView(
|
||||
title: LocaleKeys.deliveryLocation.tr(context: context),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
SizedBox(height: 16.h),
|
||||
Container(
|
||||
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
|
||||
color: AppColors.whiteColor,
|
||||
borderRadius: 20.r,
|
||||
hasShadow: true,
|
||||
),
|
||||
child: Padding(
|
||||
padding: EdgeInsets.all(16.h),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
LocaleKeys.orderSummary.tr(context: context).toText16(isBold: true),
|
||||
SizedBox(height: 16.h),
|
||||
...List.generate(
|
||||
prescriptionsViewModel.prescriptionDetailsList.length,
|
||||
(index) => Container(
|
||||
margin: EdgeInsets.all(0.0),
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
ClipRRect(
|
||||
borderRadius: BorderRadius.all(
|
||||
Radius.circular(5.r),
|
||||
),
|
||||
child: Image.network(
|
||||
prescriptionsViewModel.prescriptionDetailsList[index].imageSRCUrl!,
|
||||
fit: BoxFit.cover,
|
||||
width: 60.w,
|
||||
height: 70.h,
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
width: 10.w,
|
||||
),
|
||||
Expanded(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.all(8.h),
|
||||
child: Center(
|
||||
child: prescriptionsViewModel.prescriptionDetailsList[index].itemDescription!.toText12(),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
))
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
).paddingSymmetrical(24.w, 0),
|
||||
),
|
||||
),
|
||||
Container()
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue