home health care

merge-update-with-lab-changes
Sultan Khan 5 years ago
parent 4d00664045
commit c6fd52aad2

@ -120,6 +120,7 @@ class _NewHomeHealthCareStepOnePageState extends State<NewHomeHealthCareStepOneP
margin: EdgeInsets.only(left: 15.0, right: 15.0, top: 10.0), margin: EdgeInsets.only(left: 15.0, right: 15.0, top: 10.0),
child: Button( child: Button(
onTap: () async { onTap: () async {
widget.model.setState(ViewState.Busy);
await widget.model.getCustomerInfo(); await widget.model.getCustomerInfo();
if (widget.model.state == ViewState.ErrorLocal) { if (widget.model.state == ViewState.ErrorLocal) {
Utils.showErrorToast(); Utils.showErrorToast();

@ -94,15 +94,28 @@ class _NewHomeHealthCareStepThreePageState extends State<NewHomeHealthCareStepTh
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Container( child: Container(
height: 200, height: 200,
child: GoogleMap( // child: GoogleMap(
mapType: MapType.normal, // mapType: MapType.normal,
markers: markers, // markers: markers,
initialCameraPosition: _kGooglePlex, // initialCameraPosition: _kGooglePlex,
onMapCreated: (GoogleMapController controller) { // onMapCreated: (GoogleMapController controller) {
_controller.complete(controller); // _controller.complete(controller);
}, // },
), // ),
), child: Image.network(
"https://maps.googleapis.com/maps/api/staticmap?center=" +
widget.patientERInsertPresOrderRequestModel.latitude.toString() +
"," +
widget.patientERInsertPresOrderRequestModel.longitude.toString() +
"&zoom=16&size=600x300&maptype=roadmap&markers=color:red%7C" +
widget.patientERInsertPresOrderRequestModel.latitude.toString() +
"," +
widget.patientERInsertPresOrderRequestModel.longitude.toString() +
"&key=AIzaSyCyDbWUM9d_sBUGIE8PcuShzPaqO08NSC8",
width: double.infinity,
height: double.infinity,
fit: BoxFit.cover,
)),
), ),
SizedBox( SizedBox(
height: 12, height: 12,
@ -159,8 +172,9 @@ class _NewHomeHealthCareStepThreePageState extends State<NewHomeHealthCareStepTh
disabled: widget.patientERInsertPresOrderRequestModel.patientERHHCInsertServicesList.length == 0, disabled: widget.patientERInsertPresOrderRequestModel.patientERHHCInsertServicesList.length == 0,
color: Colors.grey[800], color: Colors.grey[800],
onTap: () async { onTap: () async {
widget.model.setState(ViewState.Busy);
widget.model.insertPresPresOrder(order: widget.patientERInsertPresOrderRequestModel).then((value) => { widget.model.insertPresPresOrder(order: widget.patientERInsertPresOrderRequestModel).then((value) => {
print(widget.model.hhcResponse), widget.model.setState(ViewState.Idle),
Navigator.push( Navigator.push(
context, context,
FadePage( FadePage(

@ -42,12 +42,12 @@ class _NewHomeHealthCareStepTowPageState extends State<NewHomeHealthCareStepTowP
AddressInfo _selectedAddress; AddressInfo _selectedAddress;
bool showCurrentLocation = false; bool showCurrentLocation = false;
Completer<GoogleMapController> _controller = Completer(); Completer<GoogleMapController> _controller = Completer();
GoogleMapController googleMapController;
final Set<Marker> markers = new Set();
static CameraPosition _kGooglePlex = CameraPosition( static CameraPosition _kGooglePlex = CameraPosition(
target: LatLng(37.42796133580664, -122.085749655962), target: LatLng(37.42796133580664, -122.085749655962),
zoom: 14.4746, zoom: 14.4746,
); );
final Set<Marker> markers = new Set();
@override @override
void initState() { void initState() {
if (widget.patientERInsertPresOrderRequestModel.latitude == null) { if (widget.patientERInsertPresOrderRequestModel.latitude == null) {
@ -56,6 +56,7 @@ class _NewHomeHealthCareStepTowPageState extends State<NewHomeHealthCareStepTowP
latitude = widget.patientERInsertPresOrderRequestModel.latitude; latitude = widget.patientERInsertPresOrderRequestModel.latitude;
longitude = widget.patientERInsertPresOrderRequestModel.longitude; longitude = widget.patientERInsertPresOrderRequestModel.longitude;
} }
markers.clear(); markers.clear();
markers.add( markers.add(
Marker( Marker(
@ -64,6 +65,7 @@ class _NewHomeHealthCareStepTowPageState extends State<NewHomeHealthCareStepTowP
), ),
position: LatLng(latitude, longitude)), position: LatLng(latitude, longitude)),
); );
_kGooglePlex = CameraPosition( _kGooglePlex = CameraPosition(
target: LatLng(latitude, longitude), target: LatLng(latitude, longitude),
zoom: 14.4746, zoom: 14.4746,
@ -98,137 +100,47 @@ class _NewHomeHealthCareStepTowPageState extends State<NewHomeHealthCareStepTowP
showNewAppBarTitle: true, showNewAppBarTitle: true,
showNewAppBar: true, showNewAppBar: true,
appBarTitle: TranslationBase.of(context).homeHealthCare, appBarTitle: TranslationBase.of(context).homeHealthCare,
body: Stack( body: Column(
children: [ children: [
Container(
margin: EdgeInsets.only(top: 120),
child: GoogleMap(
mapType: MapType.normal,
markers: markers,
initialCameraPosition: _kGooglePlex,
onMapCreated: (GoogleMapController controller) {
_controller.complete(controller);
},
)
// PlacePicker(
// apiKey: GOOGLE_API_KEY,
// enableMyLocationButton: true,
// automaticallyImplyAppBarLeading: false,
// autocompleteOnTrailingWhitespace: false,
// selectInitialPosition: true,
// autocompleteLanguage: projectViewModel.currentLanguage,
// enableMapTypeButton: false,
// searchForInitialValue: true,
// // onPlacePicked: (PickResult result) {
// // print(result.adrAddress);
// // widget.changePageViewIndex(3);
// // },
// selectedPlaceWidgetBuilder: (_, selectedPlace, state, isSearchBarFocused) {
// print("state: $state, isSearchBarFocused: $isSearchBarFocused");
// return isSearchBarFocused
// ? Container()
// : FloatingCard(
// bottomPosition: 0.0,
// leftPosition: 0.0,
// rightPosition: 0.0,
// width: 500,
// borderRadius: BorderRadius.circular(12.0),
// child: Container(
// margin: EdgeInsets.all(12),
// child: Column(
// children: [
// // SecondaryButton(
// // color: Colors.grey[800],
// // textColor: Colors.white,
// // onTap: () {
// // Navigator.push(
// // context,
// // FadePage(
// // page: LocationPage(
// // latitude: latitude,
// // longitude: longitude,
// // ),
// // ),
// // );
// // },
// // label: TranslationBase.of(context).addNewAddress,
// // ),
// // SizedBox(
// // height: 10,
// // ),
// SecondaryButton(
// color: Colors.red[800],
// textColor: Colors.white,
// onTap: () {
// setState(() {
// widget.patientERInsertPresOrderRequestModel.latitude = selectedPlace.geometry.location.lat;
// widget.patientERInsertPresOrderRequestModel.longitude = selectedPlace.geometry.location.lng;
// });
// widget.changePageViewIndex(3);
// },
// label: TranslationBase.of(context).confirm,
// ),
// ],
// ),
// ),
// );
// },
// initialPosition: LatLng(latitude, longitude),
// useCurrentLocation: showCurrentLocation,
// )
),
if (widget.model.addressesList.isNotEmpty) if (widget.model.addressesList.isNotEmpty)
Row(mainAxisAlignment: MainAxisAlignment.center, children: [ Card(
Container( margin: EdgeInsets.only(left: 12, right: 12, bottom: 12, top: 12),
height: 60, shape: cardRadius(12),
width: MediaQuery.of(context).size.width * .9, elevation: 3,
margin: EdgeInsets.only(top: 10), child: Container(
decoration: BoxDecoration(borderRadius: BorderRadius.circular(10), color: Colors.white), child: InkWell(
child: DropdownButtonHideUnderline( onTap: () => confirmSelectLocationDialog(widget.model.addressesList),
child: ButtonTheme( child: Container(
alignedDropdown: true, padding: EdgeInsets.all(8),
child: DropdownButton<AddressInfo>( width: double.infinity,
hint: Text( // height: 65,
widget.model.addressesList[0].address1, decoration: BoxDecoration(
style: TextStyle(color: CustomColors.black, fontSize: 14), borderRadius: BorderRadius.circular(10),
color: Colors.white,
), ),
iconEnabledColor: CustomColors.grey2, child: Row(
style: TextStyle(color: CustomColors.black, fontSize: 14), mainAxisAlignment: MainAxisAlignment.spaceBetween,
dropdownColor: CustomColors.white, children: [
value: _selectedAddress, Expanded(
items: widget.model.addressesList.map((AddressInfo value) { child: Text(
return DropdownMenuItem<AddressInfo>( getAddressName(),
value: value, style: TextStyle(
child: new AutoSizeText( fontWeight: FontWeight.w600,
value.address1, fontSize: 12,
letterSpacing: -0.45,
), ),
);
}).toList(),
onChanged: (r) {},
underline: Container(
height: 0,
), ),
), ),
Icon(Icons.arrow_drop_down)
],
), ),
), ),
)
]),
Positioned(
top: 80,
left: 20,
child: Row(
children: [
Icon(
Icons.add_circle_rounded,
), ),
InkWell( height: 50,
child: Texts( width: double.infinity,
TranslationBase.of(context).addNewAddress, ),
fontWeight: FontWeight.bold,
), ),
InkWell(
onTap: () { onTap: () {
Navigator.push( Navigator.push(
context, context,
@ -240,60 +152,80 @@ class _NewHomeHealthCareStepTowPageState extends State<NewHomeHealthCareStepTowP
), ),
); );
}, },
child: Padding(
padding: EdgeInsets.only(left: 12, right: 12, bottom: 16, top: 8),
child: Row(
children: [
Icon(Icons.add_circle_outline_sharp),
mWidth(12),
Text(
TranslationBase.of(context).addNewAddress,
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.w600,
letterSpacing: -0.46,
),
), ),
], ],
)) ),
// Container( ),
// child: InkWell( ),
// onTap: () => confirmSelectLocationDialog(widget.model.addressesList), Expanded(
// child: Container( child: Stack(
// padding: EdgeInsets.all(10), alignment: Alignment.center,
// width: double.infinity, children: [
// // height: 65, GoogleMap(
// decoration: BoxDecoration(borderRadius: BorderRadius.circular(10), color: Colors.white), mapType: MapType.normal,
// child: Row( zoomControlsEnabled: false,
// mainAxisAlignment: MainAxisAlignment.spaceBetween, myLocationButtonEnabled: true,
// children: [ myLocationEnabled: true,
// Expanded( initialCameraPosition: _kGooglePlex,
// child: Texts( onCameraMove: ((_position) => _updatePosition(_position)),
// getAddressName(), onMapCreated: (GoogleMapController controller) {
// fontSize: 14, googleMapController = controller;
// ), _controller.complete(controller);
// ), },
// Icon(Icons.arrow_drop_down) ),
// ], Icon(
// ), Icons.place,
// ), color: CustomColors.accentColor,
// ), size: 50,
// height: 56, ),
// width: double.infinity,
// color: Theme.of(context).scaffoldBackgroundColor,
// )
], ],
), ),
bottomSheet: Container( ),
width: MediaQuery.of(context).size.width, Padding(
height: 70.0, padding: const EdgeInsets.only(left: 20, right: 20, top: 14, bottom: 14),
margin: EdgeInsets.only(left: 15.0, right: 15.0, top: 10.0), child: SecondaryButton(
child: Button( color: Colors.red[800],
onTap: () async { textColor: Colors.white,
Navigator.push( onTap: () {
setState(() {
widget.patientERInsertPresOrderRequestModel.latitude = latitude;
widget.patientERInsertPresOrderRequestModel.longitude = longitude;
});
navigateTo(
context, context,
FadePage( NewHomeHealthCareStepThreePage(
page: NewHomeHealthCareStepThreePage(
patientERInsertPresOrderRequestModel: widget.patientERInsertPresOrderRequestModel, patientERInsertPresOrderRequestModel: widget.patientERInsertPresOrderRequestModel,
model: widget.model, model: widget.model,
), ),
),
); );
}, },
label: TranslationBase.of(context).continues, label: TranslationBase.of(context).continues,
backgroundColor: Colors.red[900],
), ),
), ),
],
),
); );
} }
void _updatePosition(CameraPosition _position) {
latitude = _position.target.latitude;
longitude = _position.target.longitude;
}
void confirmSelectLocationDialog(List<AddressInfo> addresses) { void confirmSelectLocationDialog(List<AddressInfo> addresses) {
showDialog( showDialog(
context: context, context: context,

@ -18,6 +18,7 @@ import 'package:geolocator/geolocator.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import '../StepsWidget.dart'; import '../StepsWidget.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'new_Home_health_care_step_one_page.dart'; import 'new_Home_health_care_step_one_page.dart';
class NewHomeHealthCarePage extends StatefulWidget { class NewHomeHealthCarePage extends StatefulWidget {
@ -120,26 +121,37 @@ class _NewHomeHealthCarePageState extends State<NewHomeHealthCarePage> with Tick
widthFactor: 0.9, widthFactor: 0.9,
child: SingleChildScrollView( child: SingleChildScrollView(
child: Container( child: Container(
margin: EdgeInsets.all(10), // margin: EdgeInsets.all(10),
child: Row(
children: [
Expanded(
flex: 3,
child: ClipRRect(
borderRadius: const BorderRadius.all(Radius.circular(20.0)),
child: Container( child: Container(
padding: EdgeInsets.only(left: 10, right: 10, top: 10, bottom: 10), width: double.infinity,
margin: EdgeInsets.only(left: 10, right: 10, top: 7, bottom: 7), padding: EdgeInsets.only(left: 12, right: 12, top: 12),
decoration: BoxDecoration(boxShadow: [ child: Card(
BoxShadow(color: Color(0xffcd9e1b), offset: Offset(-10, 0)), shape: cardRadius(12),
], borderRadius: const BorderRadius.all(Radius.circular(10.0)), color: Colors.white), 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( child: Row(
children: [ children: [
Expanded( Expanded(
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: [
Row(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Texts( Texts(
@ -151,24 +163,6 @@ class _NewHomeHealthCarePageState extends State<NewHomeHealthCarePage> with Tick
color: Color(0xffcd9e1b), color: Color(0xffcd9e1b),
fontWeight: FontWeight.bold, 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( Texts(
TranslationBase.of(context).requestID + ' ' + widget.model.pendingOrder.iD.toString(), TranslationBase.of(context).requestID + ' ' + widget.model.pendingOrder.iD.toString(),
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
@ -183,16 +177,21 @@ class _NewHomeHealthCarePageState extends State<NewHomeHealthCarePage> with Tick
widget.model.hhcAllOrderDetail.length, widget.model.hhcAllOrderDetail.length,
(index) => Container( (index) => Container(
child: Texts( child: Texts(
projectViewModel.isArabic projectViewModel.isArabic ? widget.model.hhcAllOrderDetail[index].descriptionN : widget.model.hhcAllOrderDetail[index].description.capitalize(),
? widget.model.hhcAllOrderDetail[index].descriptionN
: widget.model.hhcAllOrderDetail[index].description.capitalize(),
fontSize: 13, fontSize: 13,
bold: false, bold: false,
), ),
), ),
), ),
], ],
)),
Column(
children: [
Texts(
DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(widget.model.pendingOrder.createdOn)),
fontSize: 14,
), ),
mHeight(8),
SecondaryButton( SecondaryButton(
onTap: () { onTap: () {
showConfirmMessage(widget.model, widget.model.hhcAllOrderDetail[0]); showConfirmMessage(widget.model, widget.model.hhcAllOrderDetail[0]);
@ -202,205 +201,23 @@ class _NewHomeHealthCarePageState extends State<NewHomeHealthCarePage> with Tick
small: true, 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,
// ),
// ], // ],
// ), //))
// )
// ], // ],
// ), ))),
//), ))))
))
: NewHomeHealthCareStepOnePage( : NewHomeHealthCareStepOnePage(
changePageViewIndex: _changeCurrentTab, changePageViewIndex: _changeCurrentTab,
patientERInsertPresOrderRequestModel: patientERInsertPresOrderRequestModel, patientERInsertPresOrderRequestModel: patientERInsertPresOrderRequestModel,
model: widget.model, model: widget.model,
), ),
// NewHomeHealthCareStepTowPage(
// latitude: _latitude,
// longitude: _longitude,
// changePageViewIndex: _changeCurrentTab,
// patientERInsertPresOrderRequestModel: patientERInsertPresOrderRequestModel,
// model: widget.model,
// ),
// NewHomeHealthCareStepThreePage(
// changePageViewIndex: _changeCurrentTab,
// patientERInsertPresOrderRequestModel: patientERInsertPresOrderRequestModel,
// model: widget.model,
// )
], ],
), ),
), ),

@ -14,6 +14,7 @@ import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'Dialog/confirm_cancel_order_dialog.dart'; import 'Dialog/confirm_cancel_order_dialog.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
class OrdersLogDetailsPage extends StatelessWidget { class OrdersLogDetailsPage extends StatelessWidget {
final HomeHealthCareViewModel model; final HomeHealthCareViewModel model;
@ -59,32 +60,42 @@ class OrdersLogDetailsPage extends StatelessWidget {
Column( Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: model.hhcAllPresOrders.map((order) { children: model.hhcAllPresOrders.map((order) {
return Row( return Container(
children: [ // margin: EdgeInsets.all(10),
Expanded(
flex: 3,
child: ClipRRect(
borderRadius: const BorderRadius.all(Radius.circular(20.0)),
child: Container( child: Container(
padding: EdgeInsets.only(left: 10, right: 10, top: 10, bottom: 10), width: double.infinity,
margin: EdgeInsets.only(left: 10, right: 10, top: 7, bottom: 7), padding: EdgeInsets.only(left: 12, right: 12, top: 12),
decoration: BoxDecoration(boxShadow: [ child: Card(
BoxShadow( shape: cardRadius(12),
elevation: 2,
margin: EdgeInsets.zero,
color: order.status == 4 color: order.status == 4
? Colors.red[900] ? Colors.red[900]
: order.status == 3 : order.status == 3
? Colors.green[400] ? Colors.green[400]
: Color(0xffcd9e1b), : Color(0xffcd9e1b),
offset: Offset(-10, 0)), clipBehavior: Clip.antiAlias,
], borderRadius: const BorderRadius.all(Radius.circular(10.0)), color: Colors.white), 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( child: Row(
children: [ children: [
Expanded( Expanded(
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Texts( Texts(
@ -98,47 +109,11 @@ class OrdersLogDetailsPage extends StatelessWidget {
: Color(0xffcd9e1b), : Color(0xffcd9e1b),
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
],
),
Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
Texts(
DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(order.createdOn)),
fontSize: 14,
)
],
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts( Texts(
TranslationBase.of(context).requestID + ' ' + order.iD.toString(), TranslationBase.of(context).requestID + ' ' + order.iD.toString(),
bold: false, fontWeight: FontWeight.w600,
fontSize: 18, 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( Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
@ -155,199 +130,31 @@ class OrdersLogDetailsPage extends StatelessWidget {
fontSize: 13, fontSize: 13,
), ),
], ],
)
],
)),
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()
], ],
)) ),
], ],
))), ))),
) ));
],
);
// 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,
// ),
// ],
// ),
// );
}).toList()) }).toList())
], ],
), ),

Loading…
Cancel
Save