From c6fd52aad2cd1dcc8dc8015c4058e867e80d85a5 Mon Sep 17 00:00:00 2001 From: Sultan Khan Date: Tue, 14 Sep 2021 18:11:51 +0300 Subject: [PATCH] home health care --- .../new_Home_health_care_step_one_page.dart | 1 + .../new_Home_health_care_step_three_page.dart | 36 +- .../new_Home_health_care_step_tow_page.dart | 296 ++++++-------- .../new_home_health_care_page.dart | 369 +++++------------- .../orders_log_details_page.dart | 361 ++++------------- 5 files changed, 317 insertions(+), 746 deletions(-) diff --git a/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_one_page.dart b/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_one_page.dart index 442a5530..d2255712 100644 --- a/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_one_page.dart +++ b/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_one_page.dart @@ -120,6 +120,7 @@ class _NewHomeHealthCareStepOnePageState extends State { - print(widget.model.hhcResponse), + widget.model.setState(ViewState.Idle), Navigator.push( context, FadePage( diff --git a/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_tow_page.dart b/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_tow_page.dart index 590733c1..71936503 100644 --- a/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_tow_page.dart +++ b/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_tow_page.dart @@ -42,12 +42,12 @@ class _NewHomeHealthCareStepTowPageState extends State _controller = Completer(); - + GoogleMapController googleMapController; + final Set markers = new Set(); static CameraPosition _kGooglePlex = CameraPosition( target: LatLng(37.42796133580664, -122.085749655962), zoom: 14.4746, ); - final Set markers = new Set(); @override void initState() { if (widget.patientERInsertPresOrderRequestModel.latitude == null) { @@ -56,6 +56,7 @@ class _NewHomeHealthCareStepTowPageState extends State( - hint: Text( - widget.model.addressesList[0].address1, - style: TextStyle(color: CustomColors.black, fontSize: 14), - ), - iconEnabledColor: CustomColors.grey2, - style: TextStyle(color: CustomColors.black, fontSize: 14), - dropdownColor: CustomColors.white, - value: _selectedAddress, - items: widget.model.addressesList.map((AddressInfo value) { - return DropdownMenuItem( - value: value, - child: new AutoSizeText( - value.address1, + Card( + margin: EdgeInsets.only(left: 12, right: 12, bottom: 12, top: 12), + shape: cardRadius(12), + elevation: 3, + child: Container( + child: InkWell( + onTap: () => confirmSelectLocationDialog(widget.model.addressesList), + child: Container( + padding: EdgeInsets.all(8), + width: double.infinity, + // height: 65, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10), + color: Colors.white, + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Expanded( + child: Text( + getAddressName(), + style: TextStyle( + fontWeight: FontWeight.w600, + fontSize: 12, + letterSpacing: -0.45, + ), ), - ); - }).toList(), - onChanged: (r) {}, - underline: Container( - height: 0, - ), + ), + Icon(Icons.arrow_drop_down) + ], ), ), ), - ) - ]), - Positioned( - top: 80, - left: 20, + height: 50, + width: double.infinity, + ), + ), + InkWell( + onTap: () { + Navigator.push( + context, + FadePage( + page: LocationPage( + latitude: latitude, + longitude: longitude, + ), + ), + ); + }, + child: Padding( + padding: EdgeInsets.only(left: 12, right: 12, bottom: 16, top: 8), child: Row( children: [ - Icon( - Icons.add_circle_rounded, - ), - InkWell( - child: Texts( - TranslationBase.of(context).addNewAddress, - fontWeight: FontWeight.bold, + Icon(Icons.add_circle_outline_sharp), + mWidth(12), + Text( + TranslationBase.of(context).addNewAddress, + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w600, + letterSpacing: -0.46, ), - onTap: () { - Navigator.push( - context, - FadePage( - page: LocationPage( - latitude: latitude, - longitude: longitude, - ), - ), - ); - }, ), ], - )) - // Container( - // child: InkWell( - // onTap: () => confirmSelectLocationDialog(widget.model.addressesList), - // child: Container( - // padding: EdgeInsets.all(10), - // width: double.infinity, - // // height: 65, - // decoration: BoxDecoration(borderRadius: BorderRadius.circular(10), color: Colors.white), - // child: Row( - // mainAxisAlignment: MainAxisAlignment.spaceBetween, - // children: [ - // Expanded( - // child: Texts( - // getAddressName(), - // fontSize: 14, - // ), - // ), - // Icon(Icons.arrow_drop_down) - // ], - // ), - // ), - // ), - // height: 56, - // width: double.infinity, - // color: Theme.of(context).scaffoldBackgroundColor, - // ) - ], - ), - bottomSheet: Container( - width: MediaQuery.of(context).size.width, - height: 70.0, - margin: EdgeInsets.only(left: 15.0, right: 15.0, top: 10.0), - child: Button( - onTap: () async { - Navigator.push( - context, - FadePage( - page: NewHomeHealthCareStepThreePage( - patientERInsertPresOrderRequestModel: widget.patientERInsertPresOrderRequestModel, - model: widget.model, - ), ), - ); - }, - label: TranslationBase.of(context).continues, - backgroundColor: Colors.red[900], - ), + ), + ), + Expanded( + child: Stack( + alignment: Alignment.center, + children: [ + GoogleMap( + mapType: MapType.normal, + zoomControlsEnabled: false, + myLocationButtonEnabled: true, + myLocationEnabled: true, + initialCameraPosition: _kGooglePlex, + onCameraMove: ((_position) => _updatePosition(_position)), + onMapCreated: (GoogleMapController controller) { + googleMapController = controller; + _controller.complete(controller); + }, + ), + Icon( + Icons.place, + color: CustomColors.accentColor, + size: 50, + ), + ], + ), + ), + Padding( + padding: const EdgeInsets.only(left: 20, right: 20, top: 14, bottom: 14), + child: SecondaryButton( + color: Colors.red[800], + textColor: Colors.white, + onTap: () { + setState(() { + widget.patientERInsertPresOrderRequestModel.latitude = latitude; + widget.patientERInsertPresOrderRequestModel.longitude = longitude; + }); + + navigateTo( + context, + NewHomeHealthCareStepThreePage( + patientERInsertPresOrderRequestModel: widget.patientERInsertPresOrderRequestModel, + model: widget.model, + ), + ); + }, + label: TranslationBase.of(context).continues, + ), + ), + ], ), ); } + void _updatePosition(CameraPosition _position) { + latitude = _position.target.latitude; + longitude = _position.target.longitude; + } + void confirmSelectLocationDialog(List addresses) { showDialog( context: context, diff --git a/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_home_health_care_page.dart b/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_home_health_care_page.dart index 2a8cc732..2db006b4 100644 --- a/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_home_health_care_page.dart +++ b/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_home_health_care_page.dart @@ -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 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, - // ) ], ), ), diff --git a/lib/pages/AlHabibMedicalService/HomeHealthCare/orders_log_details_page.dart b/lib/pages/AlHabibMedicalService/HomeHealthCare/orders_log_details_page.dart index e8ec39ea..ae516429 100644 --- a/lib/pages/AlHabibMedicalService/HomeHealthCare/orders_log_details_page.dart +++ b/lib/pages/AlHabibMedicalService/HomeHealthCare/orders_log_details_page.dart @@ -14,6 +14,7 @@ import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; import 'Dialog/confirm_cancel_order_dialog.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; class OrdersLogDetailsPage extends StatelessWidget { final HomeHealthCareViewModel model; @@ -59,295 +60,101 @@ class OrdersLogDetailsPage extends StatelessWidget { Column( crossAxisAlignment: CrossAxisAlignment.start, children: model.hhcAllPresOrders.map((order) { - return 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( + return Container( + // 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: order.status == 4 + ? Colors.red[900] + : order.status == 3 + ? Colors.green[400] + : 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 ? order.descriptionN : order.description), + bold: false, + fontSize: 12, color: order.status == 4 ? Colors.red[900] : order.status == 3 ? Colors.green[400] : 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, + fontWeight: FontWeight.bold, + ), + Texts( + TranslationBase.of(context).requestID + ' ' + order.iD.toString(), + fontWeight: FontWeight.w600, + fontSize: 18, + ), + Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Row( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Texts( - TranslationBase.of(context).OrderStatus + ' ' + (projectViewModel.isArabic ? order.descriptionN : order.description), - bold: false, - fontSize: 12, - color: order.status == 4 - ? Colors.red[900] - : order.status == 3 - ? Colors.green[400] - : Color(0xffcd9e1b), - fontWeight: FontWeight.bold, - ), - ], + Texts( + TranslationBase.of(context).orderLocation, + bold: false, + fontSize: 13, ), - Row( - mainAxisAlignment: MainAxisAlignment.end, - children: [ - Texts( - DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(order.createdOn)), - fontSize: 14, - ) - ], + SizedBox( + height: 4, ), - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - - children: [ - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Texts( - TranslationBase.of(context).requestID + ' ' + order.iD.toString(), - bold: false, - fontSize: 18, - ), - ], - ), - (order.status == 1 || order.status == 2) - ? SecondaryButton( - onTap: () { - showConfirmMessage(model, order); - }, - label: TranslationBase.of(context).cancel, - color: Colors.red[900], - small: true, - ) - : SizedBox() - ], - // ) - // ], - // ) - // ], - ), - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Texts( - TranslationBase.of(context).orderLocation, - bold: false, - fontSize: 13, - ), - SizedBox( - height: 4, - ), - Texts( - !projectViewModel.isArabic ? order.nearestProjectDescription.toString() : order.nearestProjectDescriptionN.toString(), - fontSize: 13, - ), - ], + Texts( + !projectViewModel.isArabic ? order.nearestProjectDescription.toString() : order.nearestProjectDescriptionN.toString(), + fontSize: 13, ), ], - )) + ) ], - ))), - ) - ], - ); - - // return Container( - // width: double.infinity, - // margin: EdgeInsets.only(top: 15), - // decoration: BoxDecoration( - // border: - // Border.all(color: Colors.grey, width: 1), - // borderRadius: BorderRadius.circular(12), - // color: Colors.white), - // child: Column( - // crossAxisAlignment: CrossAxisAlignment.start, - // children: [ - // SizedBox( - // height: 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), - // color: Colors.white), - // child: Column( - // crossAxisAlignment: CrossAxisAlignment.start, - // children: [ - // Texts( - // TranslationBase - // .of(context) - // .requestID, - // bold: false, - // fontSize: 13, - // ), - // SizedBox( - // height: 4, - // ), - // Texts( - // order.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), - // color: Colors.white), - // child: Column( - // crossAxisAlignment: CrossAxisAlignment.start, - // children: [ - // Texts( - // TranslationBase - // .of(context) - // .OrderStatus, - // bold: false, - // fontSize: 13, - // ), - // SizedBox( - // height: 4, - // ), - // Texts( - - // projectViewModel.isArabic ? order.descriptionN : order.description, - // 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), - // color: Colors.white), - // child: Column( - // crossAxisAlignment: CrossAxisAlignment.start, - // children: [ - // Texts( - // TranslationBase - // .of(context) - // .pickupDate, - // bold: false, - // fontSize: 13, - // ), - // SizedBox( - // height: 4, - // ), - // Texts( - // DateUtil.getDayMonthYearDateFormatted( - // DateUtil.convertStringToDate(order.createdOn)), - // fontSize: 22, - // ), - // ], - // ), - // ), - - // SizedBox( - // height: 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), - // color: Colors.white), - // child: Column( - // crossAxisAlignment: - // CrossAxisAlignment.start, - // children: [ - // Texts( - // TranslationBase.of(context).orderLocation, - // bold: false, - // fontSize: 13, - // ), - // SizedBox( - // height: 4, - // ), - // Texts( - // !projectViewModel.isArabic ?order.nearestProjectDescription - // .toString() : - // order.nearestProjectDescriptionN - // .toString(), - // fontSize: 22, - // ), - // ], - // ), - // ), - // SizedBox( - // height: 12, - // ), - // if (order.status == 1 ||order.status == 2 ) - // Center( - // child: Container( - // width: MediaQuery - // .of(context) - // .size - // .width * - // 0.85, - // child: SecondaryButton( - // label: "Cancel".toUpperCase(), - // onTap: () { - // showConfirmMessage(model, order); - // } - // , - // color: Colors.red[800], - // disabled: false, - // textColor: Theme - // .of(context) - // .backgroundColor), - // ), - // ), - // SizedBox( - // height: 12, - // ), - // ], - // ), - // ); + )), + Column( + children: [ + Texts( + DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(order.createdOn)), + fontSize: 14, + ), + SizedBox(height: 8), + (order.status == 1 || order.status == 2) + ? SecondaryButton( + onTap: () { + showConfirmMessage(model, order); + }, + label: TranslationBase.of(context).cancel, + color: Colors.red[900], + small: true, + ) + : SizedBox() + ], + ), + ], + ))), + )); }).toList()) ], ),