|
|
|
|
@ -18,6 +18,7 @@ import 'package:geolocator/geolocator.dart';
|
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
|
|
|
|
|
import '../StepsWidget.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
|
|
|
|
|
import 'new_Home_health_care_step_one_page.dart';
|
|
|
|
|
|
|
|
|
|
class NewHomeHealthCarePage extends StatefulWidget {
|
|
|
|
|
@ -120,287 +121,103 @@ class _NewHomeHealthCarePageState extends State<NewHomeHealthCarePage> with Tick
|
|
|
|
|
widthFactor: 0.9,
|
|
|
|
|
child: SingleChildScrollView(
|
|
|
|
|
child: Container(
|
|
|
|
|
margin: EdgeInsets.all(10),
|
|
|
|
|
child: Row(
|
|
|
|
|
children: [
|
|
|
|
|
Expanded(
|
|
|
|
|
flex: 3,
|
|
|
|
|
child: ClipRRect(
|
|
|
|
|
borderRadius: const BorderRadius.all(Radius.circular(20.0)),
|
|
|
|
|
child: Container(
|
|
|
|
|
padding: EdgeInsets.only(left: 10, right: 10, top: 10, bottom: 10),
|
|
|
|
|
margin: EdgeInsets.only(left: 10, right: 10, top: 7, bottom: 7),
|
|
|
|
|
decoration: BoxDecoration(boxShadow: [
|
|
|
|
|
BoxShadow(color: Color(0xffcd9e1b), offset: Offset(-10, 0)),
|
|
|
|
|
], borderRadius: const BorderRadius.all(Radius.circular(10.0)), color: Colors.white),
|
|
|
|
|
child: Row(
|
|
|
|
|
children: [
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Column(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Row(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Texts(
|
|
|
|
|
TranslationBase.of(context).OrderStatus +
|
|
|
|
|
' ' +
|
|
|
|
|
(projectViewModel.isArabic ? widget.model.pendingOrder.descriptionN : widget.model.pendingOrder.description),
|
|
|
|
|
bold: false,
|
|
|
|
|
fontSize: 12,
|
|
|
|
|
color: Color(0xffcd9e1b),
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.end,
|
|
|
|
|
children: [
|
|
|
|
|
Texts(
|
|
|
|
|
DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(widget.model.pendingOrder.createdOn)),
|
|
|
|
|
fontSize: 14,
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
|
|
|
|
|
children: [
|
|
|
|
|
Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Texts(
|
|
|
|
|
TranslationBase.of(context).requestID + ' ' + widget.model.pendingOrder.iD.toString(),
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
fontSize: 18,
|
|
|
|
|
),
|
|
|
|
|
Texts(
|
|
|
|
|
TranslationBase.of(context).serviceName,
|
|
|
|
|
fontSize: 12,
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
),
|
|
|
|
|
...List.generate(
|
|
|
|
|
widget.model.hhcAllOrderDetail.length,
|
|
|
|
|
(index) => Container(
|
|
|
|
|
child: Texts(
|
|
|
|
|
projectViewModel.isArabic
|
|
|
|
|
? widget.model.hhcAllOrderDetail[index].descriptionN
|
|
|
|
|
: widget.model.hhcAllOrderDetail[index].description.capitalize(),
|
|
|
|
|
fontSize: 13,
|
|
|
|
|
bold: false,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
SecondaryButton(
|
|
|
|
|
onTap: () {
|
|
|
|
|
showConfirmMessage(widget.model, widget.model.hhcAllOrderDetail[0]);
|
|
|
|
|
},
|
|
|
|
|
label: TranslationBase.of(context).cancel,
|
|
|
|
|
color: Colors.red[900],
|
|
|
|
|
small: true,
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
// )
|
|
|
|
|
// ],
|
|
|
|
|
// )
|
|
|
|
|
// ],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
))
|
|
|
|
|
],
|
|
|
|
|
))),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
))
|
|
|
|
|
|
|
|
|
|
// Row(
|
|
|
|
|
// children: [
|
|
|
|
|
// Expanded(
|
|
|
|
|
// flex: 1,
|
|
|
|
|
// child: ClipRRect(
|
|
|
|
|
// borderRadius: const BorderRadius.all(Radius.circular(20.0)),
|
|
|
|
|
// child: Container(
|
|
|
|
|
// padding: EdgeInsets.only(left: 10, right: 10, top: 20, bottom: 20),
|
|
|
|
|
// margin: EdgeInsets.only(left: 20, right: 20, top: 7, bottom: 7),
|
|
|
|
|
// decoration: BoxDecoration(
|
|
|
|
|
// boxShadow: [
|
|
|
|
|
// BoxShadow(color: Colors.green, offset: Offset(-5, 0)),
|
|
|
|
|
// ],
|
|
|
|
|
// )))),
|
|
|
|
|
// Expanded(
|
|
|
|
|
// flex: 5,
|
|
|
|
|
// child: Column(
|
|
|
|
|
// crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
// children: [
|
|
|
|
|
// Container(
|
|
|
|
|
// width: double.infinity,
|
|
|
|
|
// padding: EdgeInsets.all(5),
|
|
|
|
|
// decoration: BoxDecoration(
|
|
|
|
|
// border: Border(
|
|
|
|
|
// bottom: BorderSide(
|
|
|
|
|
// color: Colors.grey,
|
|
|
|
|
// width: 1.0,
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// // borderRadius: BorderRadius.circular(12),
|
|
|
|
|
// ),
|
|
|
|
|
// child: Row(
|
|
|
|
|
// crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
// children: [
|
|
|
|
|
// Texts(
|
|
|
|
|
// TranslationBase.of(context).OrderStatus,
|
|
|
|
|
// bold: false,
|
|
|
|
|
// fontSize: 12,
|
|
|
|
|
// ),
|
|
|
|
|
// SizedBox(
|
|
|
|
|
// height: 4,
|
|
|
|
|
// ),
|
|
|
|
|
// Texts(
|
|
|
|
|
// projectViewModel.isArabic ? widget.model.pendingOrder.descriptionN : widget.model.pendingOrder.description,
|
|
|
|
|
// fontSize: 12,
|
|
|
|
|
// ),
|
|
|
|
|
// ],
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// Container(
|
|
|
|
|
// width: double.infinity,
|
|
|
|
|
// padding: EdgeInsets.only(left: 15, bottom: 15, top: 15, right: 15),
|
|
|
|
|
// decoration: BoxDecoration(
|
|
|
|
|
// border: Border(
|
|
|
|
|
// bottom: BorderSide(
|
|
|
|
|
// color: Colors.grey,
|
|
|
|
|
// width: 1.0,
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// // borderRadius: BorderRadius.circular(12),
|
|
|
|
|
// ),
|
|
|
|
|
// child: Column(
|
|
|
|
|
// crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
// children: [
|
|
|
|
|
// Texts(
|
|
|
|
|
// TranslationBase.of(context).requestID,
|
|
|
|
|
// bold: false,
|
|
|
|
|
// fontSize: 13,
|
|
|
|
|
// ),
|
|
|
|
|
// SizedBox(
|
|
|
|
|
// height: 4,
|
|
|
|
|
// ),
|
|
|
|
|
// Texts(
|
|
|
|
|
// widget.model.pendingOrder.iD.toString(),
|
|
|
|
|
// fontSize: 22,
|
|
|
|
|
// ),
|
|
|
|
|
// ],
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// Container(
|
|
|
|
|
// width: double.infinity,
|
|
|
|
|
// padding: EdgeInsets.only(left: 15, bottom: 15, top: 15, right: 15),
|
|
|
|
|
// decoration: BoxDecoration(
|
|
|
|
|
// border: Border(
|
|
|
|
|
// bottom: BorderSide(
|
|
|
|
|
// color: Colors.grey,
|
|
|
|
|
// width: 1.0,
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// // borderRadius: BorderRadius.circular(12),
|
|
|
|
|
// ),
|
|
|
|
|
// child: Column(
|
|
|
|
|
// crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
// children: [
|
|
|
|
|
// Texts(
|
|
|
|
|
// TranslationBase.of(context).pickupDate,
|
|
|
|
|
// bold: false,
|
|
|
|
|
// fontSize: 13,
|
|
|
|
|
// ),
|
|
|
|
|
// SizedBox(
|
|
|
|
|
// height: 4,
|
|
|
|
|
// ),
|
|
|
|
|
// Texts(
|
|
|
|
|
// DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(widget.model.pendingOrder.createdOn)),
|
|
|
|
|
// fontSize: 22,
|
|
|
|
|
// ),
|
|
|
|
|
// ],
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// ...List.generate(
|
|
|
|
|
// widget.model.hhcAllOrderDetail.length,
|
|
|
|
|
// (index) => Container(
|
|
|
|
|
// width: double.infinity,
|
|
|
|
|
// padding: EdgeInsets.only(left: 15, bottom: 15, top: 15, right: 15),
|
|
|
|
|
// decoration: BoxDecoration(
|
|
|
|
|
// border: Border(
|
|
|
|
|
// bottom: BorderSide(
|
|
|
|
|
// color: Colors.grey,
|
|
|
|
|
// width: 1.0,
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// // borderRadius: BorderRadius.circular(12),
|
|
|
|
|
// color: Theme.of(context).primaryColor),
|
|
|
|
|
// child: Column(
|
|
|
|
|
// crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
// children: [
|
|
|
|
|
// Texts(
|
|
|
|
|
// TranslationBase.of(context).serviceName,
|
|
|
|
|
// bold: false,
|
|
|
|
|
// fontSize: 13,
|
|
|
|
|
// ),
|
|
|
|
|
// SizedBox(
|
|
|
|
|
// height: 4,
|
|
|
|
|
// ),
|
|
|
|
|
// Texts(
|
|
|
|
|
// projectViewModel.isArabic ? widget.model.hhcAllOrderDetail[index].descriptionN : widget.model.hhcAllOrderDetail[index].description,
|
|
|
|
|
// fontSize: 22,
|
|
|
|
|
// bold: true,
|
|
|
|
|
// ),
|
|
|
|
|
// ],
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// SizedBox(
|
|
|
|
|
// height: 12,
|
|
|
|
|
// ),
|
|
|
|
|
// Center(
|
|
|
|
|
// child: Container(
|
|
|
|
|
// width: MediaQuery.of(context).size.width * 0.85,
|
|
|
|
|
// child: SecondaryButton(
|
|
|
|
|
// label: TranslationBase.of(context).cancel.toUpperCase(),
|
|
|
|
|
// onTap: () {
|
|
|
|
|
// showConfirmMessage(widget.model, widget.model.hhcAllOrderDetail[0]);
|
|
|
|
|
// },
|
|
|
|
|
// color: Colors.red[800],
|
|
|
|
|
// disabled: false,
|
|
|
|
|
// textColor: Theme.of(context).backgroundColor),
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// SizedBox(
|
|
|
|
|
// height: 12,
|
|
|
|
|
// ),
|
|
|
|
|
// ],
|
|
|
|
|
// ),
|
|
|
|
|
// )
|
|
|
|
|
// ],
|
|
|
|
|
// ),
|
|
|
|
|
//),
|
|
|
|
|
))
|
|
|
|
|
// margin: EdgeInsets.all(10),
|
|
|
|
|
child: Container(
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
padding: EdgeInsets.only(left: 12, right: 12, top: 12),
|
|
|
|
|
child: Card(
|
|
|
|
|
shape: cardRadius(12),
|
|
|
|
|
elevation: 2,
|
|
|
|
|
margin: EdgeInsets.zero,
|
|
|
|
|
color: Color(0xffcd9e1b),
|
|
|
|
|
clipBehavior: Clip.antiAlias,
|
|
|
|
|
child: Container(
|
|
|
|
|
// decoration: containerColorRadiusLeft(Colors.white, 12),
|
|
|
|
|
margin: EdgeInsets.only(left: projectViewModel.isArabic ? 0 : 8, right: projectViewModel.isArabic ? 8 : 0),
|
|
|
|
|
padding: EdgeInsets.all(12),
|
|
|
|
|
// color: Colors.white,
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
shape: BoxShape.rectangle,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
borderRadius: BorderRadius.only(
|
|
|
|
|
topLeft: projectViewModel.isArabic ? Radius.zero : Radius.circular(12.0),
|
|
|
|
|
topRight: projectViewModel.isArabic ? Radius.circular(12.0) : Radius.zero,
|
|
|
|
|
bottomLeft: projectViewModel.isArabic ? Radius.zero : Radius.circular(12.0),
|
|
|
|
|
bottomRight: projectViewModel.isArabic ? Radius.circular(12.0) : Radius.zero,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
// clipBehavior: Clip.antiAlias,
|
|
|
|
|
child: Row(
|
|
|
|
|
children: [
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Column(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Texts(
|
|
|
|
|
TranslationBase.of(context).OrderStatus +
|
|
|
|
|
' ' +
|
|
|
|
|
(projectViewModel.isArabic ? widget.model.pendingOrder.descriptionN : widget.model.pendingOrder.description),
|
|
|
|
|
bold: false,
|
|
|
|
|
fontSize: 12,
|
|
|
|
|
color: Color(0xffcd9e1b),
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
),
|
|
|
|
|
Texts(
|
|
|
|
|
TranslationBase.of(context).requestID + ' ' + widget.model.pendingOrder.iD.toString(),
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
fontSize: 18,
|
|
|
|
|
),
|
|
|
|
|
Texts(
|
|
|
|
|
TranslationBase.of(context).serviceName,
|
|
|
|
|
fontSize: 12,
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
),
|
|
|
|
|
...List.generate(
|
|
|
|
|
widget.model.hhcAllOrderDetail.length,
|
|
|
|
|
(index) => Container(
|
|
|
|
|
child: Texts(
|
|
|
|
|
projectViewModel.isArabic ? widget.model.hhcAllOrderDetail[index].descriptionN : widget.model.hhcAllOrderDetail[index].description.capitalize(),
|
|
|
|
|
fontSize: 13,
|
|
|
|
|
bold: false,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
)),
|
|
|
|
|
Column(
|
|
|
|
|
children: [
|
|
|
|
|
Texts(
|
|
|
|
|
DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(widget.model.pendingOrder.createdOn)),
|
|
|
|
|
fontSize: 14,
|
|
|
|
|
),
|
|
|
|
|
mHeight(8),
|
|
|
|
|
SecondaryButton(
|
|
|
|
|
onTap: () {
|
|
|
|
|
showConfirmMessage(widget.model, widget.model.hhcAllOrderDetail[0]);
|
|
|
|
|
},
|
|
|
|
|
label: TranslationBase.of(context).cancel,
|
|
|
|
|
color: Colors.red[900],
|
|
|
|
|
small: true,
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
// )
|
|
|
|
|
// ],
|
|
|
|
|
// )
|
|
|
|
|
// ],
|
|
|
|
|
// ),
|
|
|
|
|
// ],
|
|
|
|
|
//))
|
|
|
|
|
// ],
|
|
|
|
|
))),
|
|
|
|
|
))))
|
|
|
|
|
: NewHomeHealthCareStepOnePage(
|
|
|
|
|
changePageViewIndex: _changeCurrentTab,
|
|
|
|
|
patientERInsertPresOrderRequestModel: patientERInsertPresOrderRequestModel,
|
|
|
|
|
model: widget.model,
|
|
|
|
|
),
|
|
|
|
|
// NewHomeHealthCareStepTowPage(
|
|
|
|
|
// latitude: _latitude,
|
|
|
|
|
// longitude: _longitude,
|
|
|
|
|
// changePageViewIndex: _changeCurrentTab,
|
|
|
|
|
// patientERInsertPresOrderRequestModel: patientERInsertPresOrderRequestModel,
|
|
|
|
|
// model: widget.model,
|
|
|
|
|
// ),
|
|
|
|
|
// NewHomeHealthCareStepThreePage(
|
|
|
|
|
// changePageViewIndex: _changeCurrentTab,
|
|
|
|
|
// patientERInsertPresOrderRequestModel: patientERInsertPresOrderRequestModel,
|
|
|
|
|
// model: widget.model,
|
|
|
|
|
// )
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
|