Merge branch 'Fatima-New-Design' into 'development_new_design_2.0'

Fatima new design

See merge request Cloud_Solution/diplomatic-quarter!539
merge-update-with-lab-changes
haroon amjad 4 years ago
commit 17d569216d

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

@ -246,6 +246,7 @@ const Map localizedValues = {
"companyName": {"en": "Company Name:", "ar": "اسم الشركة: "},
"receiptOn": {"en": "Receipt on:", "ar": "تاريخ الفاتورة: "},
"expiryDate": {"en": "Expiry Date:", "ar": "تاريخ الانتهاء: "},
"expiryPoints": {"en": "Expired", "ar": " منتهية الصلاحية"},
"expiryOn": {"en": "Expiry on:", "ar": "تاريخ الانتهاء: "},
"procedureName": {"en": "Procedure Name:", "ar": "اسم الاجراء:"},
"procedure": {"en": "Procedure", "ar": "اسم الاجراء:"},

@ -71,7 +71,8 @@ class _LacumTransferPageState extends State<LacumTransferPage> {
color: Color(0xffe1e1e1),
width: 0.4,
)),
color: Color(0xff6294ed),
color: Colors.green
//(0xff6294ed),
),
child: Row(
crossAxisAlignment:

@ -28,11 +28,13 @@ class LakumMainPage extends StatelessWidget {
return BaseView<LacumViewModel>(
onModelReady: (model) async {
await model.getLacumData();
if (model.lacumInformation.yahalaAccountNo == 0 || model.lacumInformation.yahalaAccountNo == null) {
if (model.lacumInformation.yahalaAccountNo == 0 ||
model.lacumInformation.yahalaAccountNo == null) {
navigateToLakumRegister(context);
} else {
if (model.lacumInformation.status == "Hold") {
Navigator.pushReplacement(context, FadePage(page: LakumActivationVidaPage()));
Navigator.pushReplacement(
context, FadePage(page: LakumActivationVidaPage()));
}
}
},
@ -49,7 +51,10 @@ class LakumMainPage extends StatelessWidget {
body: Container(
width: double.infinity,
child: SingleChildScrollView(
child: (model.lacumGroupInformation != null && model.lacumGroupInformation.lakumInquiryInformationObjVersion != null)
child: (model.lacumGroupInformation != null &&
model.lacumGroupInformation
.lakumInquiryInformationObjVersion !=
null)
? Column(
children: [
Stack(
@ -63,7 +68,11 @@ class LakumMainPage extends StatelessWidget {
SizedBox(
height: mediaQuery.size.height * 0.02,
),
Container(width: mediaQuery.size.width * 1, child: LakumBannerWidget(model, mediaQuery, true)),
Container(
width: mediaQuery.size.width * 1,
height: mediaQuery.size.width * .6,
child: LakumBannerWidget(
model, mediaQuery, true)),
],
)
],
@ -76,18 +85,44 @@ class LakumMainPage extends StatelessWidget {
height: 12,
),
Container(
height: 100,
margin: EdgeInsets.symmetric(horizontal: 16, vertical: 12.0),
height: 110,
margin: EdgeInsets.symmetric(
horizontal: 16, vertical: 12.0),
child: ListView(
scrollDirection: Axis.horizontal,
children: <Widget>[
LacumPointsWidget(mediaQuery, 1, TranslationBase.of(context).balance, model.lacumGroupInformation.lakumInquiryInformationObjVersion.pointsBalanceAmount,
model.lacumGroupInformation.lakumInquiryInformationObjVersion.pointsBalance, null),
LacumPointsWidget(
mediaQuery,
1,
TranslationBase.of(context).balance,
model
.lacumGroupInformation
.lakumInquiryInformationObjVersion
.pointsBalanceAmount,
model
.lacumGroupInformation
.lakumInquiryInformationObjVersion
.pointsBalance,
null),
SizedBox(
width: 8,
),
LacumPointsWidget(mediaQuery, 2, TranslationBase.of(context).gained, model.lacumGroupInformation.lakumInquiryInformationObjVersion.pointsBalanceAmount,
model.lacumGroupInformation.lakumInquiryInformationObjVersion.gainedPoints, model.lacumGroupInformation.lakumInquiryInformationObjVersion.gainedPointsAmountPerYear),
LacumPointsWidget(
mediaQuery,
2,
TranslationBase.of(context).gained,
model
.lacumGroupInformation
.lakumInquiryInformationObjVersion
.pointsBalanceAmount,
model
.lacumGroupInformation
.lakumInquiryInformationObjVersion
.gainedPoints,
model
.lacumGroupInformation
.lakumInquiryInformationObjVersion
.gainedPointsAmountPerYear),
SizedBox(
width: 8,
),
@ -95,16 +130,40 @@ class LakumMainPage extends StatelessWidget {
mediaQuery,
3,
TranslationBase.of(context).consumed,
model.lacumGroupInformation.lakumInquiryInformationObjVersion.consumedPointsAmount != null
? int.parse(model.lacumGroupInformation.lakumInquiryInformationObjVersion.consumedPointsAmount)
model
.lacumGroupInformation
.lakumInquiryInformationObjVersion
.consumedPointsAmount !=
null
? int.parse(model
.lacumGroupInformation
.lakumInquiryInformationObjVersion
.consumedPointsAmount)
: 0,
model.lacumGroupInformation.lakumInquiryInformationObjVersion.consumedPoints,
model.lacumGroupInformation.lakumInquiryInformationObjVersion.consumedPointsAmountPerYear),
model
.lacumGroupInformation
.lakumInquiryInformationObjVersion
.consumedPoints,
model
.lacumGroupInformation
.lakumInquiryInformationObjVersion
.consumedPointsAmountPerYear),
SizedBox(
width: 8,
),
LacumPointsWidget(mediaQuery, 4, TranslationBase.of(context).transferred, 0, model.lacumGroupInformation.lakumInquiryInformationObjVersion.transferPoints,
model.lacumGroupInformation.lakumInquiryInformationObjVersion.transferPointsAmountPerYear),
LacumPointsWidget(
mediaQuery,
4,
TranslationBase.of(context).transferred,
0,
model
.lacumGroupInformation
.lakumInquiryInformationObjVersion
.transferPoints,
model
.lacumGroupInformation
.lakumInquiryInformationObjVersion
.transferPointsAmountPerYear),
],
),
),
@ -128,7 +187,8 @@ class LakumMainPage extends StatelessWidget {
),
),
Container(
margin: EdgeInsets.symmetric(vertical: 16, horizontal: 8),
margin:
EdgeInsets.symmetric(vertical: 16, horizontal: 8),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
@ -143,7 +203,7 @@ class LakumMainPage extends StatelessWidget {
Padding(
padding: EdgeInsets.symmetric(horizontal: 8),
child: Texts(
TranslationBase.of(context).expiryDate,
TranslationBase.of(context).expiryPoints,
// "Expired",
fontSize: 14,
),
@ -151,7 +211,7 @@ class LakumMainPage extends StatelessWidget {
],
),
Texts(
"${model.lacumGroupInformation.lakumInquiryInformationObjVersion.expiredPoints}${TranslationBase.of(context).lakumPoint} ",
"${model.lacumGroupInformation.lakumInquiryInformationObjVersion.expiredPoints} ${TranslationBase.of(context).lakumPoint} ",
fontWeight: FontWeight.bold,
fontSize: 14,
),
@ -164,39 +224,45 @@ class LakumMainPage extends StatelessWidget {
// fontSize: 14,
// ),
Container(
margin: EdgeInsets.symmetric(vertical: 16, horizontal: 8),
child: Row(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [
Row(
margin:
EdgeInsets.symmetric(vertical: 16, horizontal: 8),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Image.asset(
"assets/images/pharmacy_module/lakum/waiting_gained_icon.png",
fit: BoxFit.fill,
width: 20,
height: 25,
),
Padding(
padding: EdgeInsets.symmetric(horizontal: 8),
child: Texts(
TranslationBase.of(context).Waitinggained,
Row(
children: [
Image.asset(
"assets/images/pharmacy_module/lakum/waiting_gained_icon.png",
fit: BoxFit.fill,
width: 20,
height: 25,
),
Padding(
padding:
EdgeInsets.symmetric(horizontal: 8),
child: Texts(
TranslationBase.of(context)
.Waitinggained,
// "Waiting gained",
fontSize: 14,
),
)
],
),
Texts(
"${model.lacumGroupInformation.lakumInquiryInformationObjVersion.waitingPoints} ${TranslationBase.of(context).lakumPoint}",
fontWeight: FontWeight.bold,
fontSize: 14,
),
])),
fontSize: 14,
),
)
],
),
Texts(
"${model.lacumGroupInformation.lakumInquiryInformationObjVersion.waitingPoints} ${TranslationBase.of(context).lakumPoint}",
fontWeight: FontWeight.bold,
fontSize: 14,
),
])),
// Texts(
// "${model.lacumGroupInformation.lakumInquiryInformationObjVersion.waitingPoints} Points",
// fontWeight: FontWeight.bold,
// fontSize: 14,
// ),
Container(
margin: EdgeInsets.symmetric(vertical: 16, horizontal: 8),
margin:
EdgeInsets.symmetric(vertical: 16, horizontal: 8),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
@ -249,7 +315,11 @@ class LakumMainPage extends StatelessWidget {
}
navigateToLakumRegister(BuildContext context) {
Navigator.pushReplacement(context, FadePage(page: LakumRegistrationPage(projectViewModel.user.patientIdentificationNo)));
Navigator.pushReplacement(
context,
FadePage(
page: LakumRegistrationPage(
projectViewModel.user.patientIdentificationNo)));
}
}
@ -259,7 +329,12 @@ List<Widget> _buildAppBarICons(BuildContext context, LacumViewModel model) {
icon: Icon(Icons.settings),
color: Colors.white,
onPressed: () {
Navigator.push(context, FadePage(page: LakumSettingPage(model.lacumInformation, model.lacumGroupInformation))).then((result) => {model.getLacumGroupData()});
Navigator.push(
context,
FadePage(
page: LakumSettingPage(
model.lacumInformation, model.lacumGroupInformation)))
.then((result) => {model.getLacumGroupData()});
},
),
];
@ -281,7 +356,9 @@ class LakumHomeButtons extends StatelessWidget {
child: InkWell(
onTap: () {
print("Account activate click");
Navigator.push(context, FadePage(page: LakumActivationVidaPage())).then((result) => {model.getLacumGroupData()});
Navigator.push(
context, FadePage(page: LakumActivationVidaPage()))
.then((result) => {model.getLacumGroupData()});
},
child: Container(
padding: EdgeInsets.symmetric(horizontal: 8),
@ -324,7 +401,12 @@ class LakumHomeButtons extends StatelessWidget {
child: InkWell(
onTap: () {
print("Lacum transfer click");
Navigator.push(context, FadePage(page: LacumTransferPage(model.lacumInformation, model.lacumGroupInformation))).then((result) => {model.getLacumGroupData()});
Navigator.push(
context,
FadePage(
page: LacumTransferPage(model.lacumInformation,
model.lacumGroupInformation)))
.then((result) => {model.getLacumGroupData()});
},
child: Container(
padding: EdgeInsets.symmetric(horizontal: 8),
@ -340,7 +422,8 @@ class LakumHomeButtons extends StatelessWidget {
child: Row(
children: [
Image.asset(
"assets/images/pharmacy_module/lakum/Lakum_transfer_icon.png",
"assets/images/pharmacy_module/lakum/akum_transfer.png",
// "assets/images/pharmacy_module/lakum/Lakum_transfer_icon.png",
fit: BoxFit.fill,
width: 35,
height: 30,
@ -375,13 +458,15 @@ class LacumPointsWidget extends StatelessWidget {
Color titleColor;
final List<PointsAmountPerYear> pointsAmountPerYear;
LacumPointsWidget(this.mediaQuery, this.pointType, this.title, this.riyal, this.point, this.pointsAmountPerYear) {
LacumPointsWidget(this.mediaQuery, this.pointType, this.title, this.riyal,
this.point, this.pointsAmountPerYear) {
if (pointType == 1) {
titleColor = Color(0xffefefef);
} else if (pointType == 2) {
titleColor = Color(0xff004bcc);
} else if (pointType == 3) {
// titleColor = Color(0xff004bcc);
titleColor = Color(0xff339933);
} else if (pointType == 3) {
titleColor = Colors.grey;
} else {
titleColor = Color(0xffffa500);
}
@ -393,9 +478,11 @@ class LacumPointsWidget extends StatelessWidget {
onTap: () {
if (pointType != 1) {
if (pointsAmountPerYear != null && pointsAmountPerYear.length > 0) {
Navigator.push(context, FadePage(page: LakumPointsYearPage(pointsAmountPerYear)));
Navigator.push(context,
FadePage(page: LakumPointsYearPage(pointsAmountPerYear)));
} else {
AppToast.showErrorToast(message: TranslationBase.of(context).lakumMsg);
AppToast.showErrorToast(
message: TranslationBase.of(context).lakumMsg);
// show snackBar No Details Points are there
}
}
@ -410,7 +497,7 @@ class LacumPointsWidget extends StatelessWidget {
color: Color(0xffe1e1e1),
width: 0.4,
)),
color: pointType == 1 ? Colors.green : Color(0xffefefef),
color: pointType == 1 ? Color(0xff339933) : Color(0xffefefef),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,

@ -19,61 +19,64 @@ class AvailabilityInfo extends StatelessWidget {
TranslationBase.of(context).noLocationAvailable,
),
)
: ListView.builder(
physics: ScrollPhysics(),
scrollDirection: Axis.vertical,
shrinkWrap: true,
itemCount: previousModel.productLocationService.length,
itemBuilder: (BuildContext context, int index) {
return Padding(
padding: EdgeInsets.all(8.0),
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Expanded(
flex: 1,
child: Image.network(previousModel.productLocationService[index].projectImageUrl),
),
SizedBox(
width: 10,
),
Expanded(
flex: 4,
child: Text(
previousModel.productLocationService[index].locationDescription + "\n" + previousModel.productLocationService[index].cityName.toString(),
style: TextStyle(fontSize: 12),
: Container(
margin: EdgeInsets.only(bottom: 40),
child: ListView.builder(
physics: ScrollPhysics(),
scrollDirection: Axis.vertical,
shrinkWrap: true,
itemCount: previousModel.productLocationService.length,
itemBuilder: (BuildContext context, int index) {
return Padding(
padding: EdgeInsets.all(8),
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Expanded(
flex: 1,
child: Image.network(previousModel.productLocationService[index].projectImageUrl),
),
),
Expanded(
flex: 1,
child: IconButton(
icon: Icon(Icons.location_on),
color: Colors.red,
onPressed: () {
MapsLauncher.launchCoordinates(double.parse(previousModel.productLocationService[index].latitude), double.parse(previousModel.productLocationService[index].latitude), previousModel.productLocationService[index].locationDescription);
},
SizedBox(
width: 10,
),
),
Expanded(
flex: 1,
child: IconButton(
icon: Icon(Icons.phone),
color: Colors.red,
onPressed: () {
launch("tel://" + previousModel.productLocationService[index].phoneNumber);
},
Expanded(
flex: 4,
child: Text(
previousModel.productLocationService[index].locationDescription + "\n" + previousModel.productLocationService[index].cityName.toString(),
style: TextStyle(fontSize: 12),
),
),
),
],
),
Divider(height: 1.2, color: Colors.grey)
],
),
);
},
);
Expanded(
flex: 1,
child: IconButton(
icon: Icon(Icons.location_on),
color: Colors.red,
onPressed: () {
MapsLauncher.launchCoordinates(double.parse(previousModel.productLocationService[index].latitude), double.parse(previousModel.productLocationService[index].longitude), previousModel.productLocationService[index].locationDescription);
},
),
),
Expanded(
flex: 1,
child: IconButton(
icon: Icon(Icons.phone),
color: Colors.red,
onPressed: () {
launch("tel://" + previousModel.productLocationService[index].phoneNumber);
},
),
),
],
),
Divider(height: 1.2, color: Colors.grey)
],
),
);
},
),
);
}
convertCityName(txt) {

@ -133,7 +133,7 @@ class _FooterWidgetState extends State<FooterWidget> {
height: 20,
),
Container(
height: 58,
height: 55,
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,

@ -290,18 +290,19 @@ class __ProductDetailPageState extends State<ProductDetailPage> {
product: widget.product,
previousModel: model,
)
: isAvailability && widget.product.stockAvailability != "Out of stock"
: isAvailability
//&& widget.product.stockAvailability != "Out of stock"
? AvailabilityInfo(previousModel: model)
: isAvailability && widget.product.stockAvailability == "Out of stock"
? Container(
// padding: EdgeInsets.all(15),
padding: EdgeInsets.fromLTRB(15, 15, 15, 20),
margin: EdgeInsets.only(bottom: 20),
alignment: Alignment.center,
child: Text(
TranslationBase.of(context).noLocationAvailable,
),
)
// : isAvailability && widget.product.stockAvailability == "Out of stock"
// ? Container(
// // padding: EdgeInsets.all(15),
// padding: EdgeInsets.fromLTRB(15, 15, 15, 20),
// margin: EdgeInsets.only(bottom: 20),
// alignment: Alignment.center,
// child: Text(
// TranslationBase.of(context).noLocationAvailable,
// ),
// )
: Container(),
],
),

@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyProduct.dart'
import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/borderedButton.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
@ -57,22 +58,32 @@ class _ProductNameAndPriceState extends State<ProductNameAndPrice> {
// SizedBox(width: 20),
if (widget.authenticatedUserObject.isLogin)
!widget.isStockAvailable && widget.customerId != null
? InkWell(
onTap: () => widget.notifyMeWhenAvailable(context, widget.item.id),
child: Row(children: [
Texts(
?BorderedButton(
TranslationBase.of(context).notifyMe,
decoration: TextDecoration.underline,
color: Colors.blue,
),
SizedBox(width: 4),
Icon(
FontAwesomeIcons.bell,
color: Colors.blue,
size: 15.0,
)
]),
)
hasBorder: true,
borderColor: Colors.green,
textColor: Colors.green,
fontWeight: FontWeight.bold,
vPadding: 6,
hPadding: 14,
handler: () => widget.notifyMeWhenAvailable(context, widget.item.id),
)
// InkWell(
// onTap: () => widget.notifyMeWhenAvailable(context, widget.item.id),
// child: Row(children: [
// Texts(
// TranslationBase.of(context).notifyMe,
// decoration: TextDecoration.underline,
// color: Colors.blue,
// ),
// SizedBox(width: 4),
// Icon(
// FontAwesomeIcons.bell,
// color: Colors.blue,
// size: 15.0,
// )
// ]),
// )
: IconWithBg(
icon: !widget.isInWishList ? Icons.favorite_border : Icons.favorite,
color: !widget.isInWishList ? Colors.white : Colors.red[800],

@ -59,7 +59,7 @@ class _LakumBannerWidgetState extends State<LakumBannerWidget> {
height: widget.mediaQuery.size.width * 1.0,
),
Container(
margin: EdgeInsets.fromLTRB(12, 70, 12, 4),
margin: EdgeInsets.fromLTRB(12, 75, 12, 0),
child: Column(
children: [
Row(
@ -70,13 +70,13 @@ class _LakumBannerWidgetState extends State<LakumBannerWidget> {
children: [
Texts(
widget.model.lacumGroupInformation.lakumInquiryInformationObjVersion.memberName,
fontSize: 14,
fontSize: 13,
fontWeight: FontWeight.bold,
color: Colors.black,
),
Texts(
"${widget.model.lacumInformation.yahalaAccountNo}",
fontSize: 16,
fontSize: 13,
fontWeight: FontWeight.normal,
color: Colors.black,
),
@ -117,7 +117,7 @@ class _LakumBannerWidgetState extends State<LakumBannerWidget> {
],
),
SizedBox(
height: 10,
height: 5,
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
@ -127,14 +127,14 @@ class _LakumBannerWidgetState extends State<LakumBannerWidget> {
children: [
Texts(TranslationBase.of(context).identificationNumber,
// "IDENTIFICATION #",
fontSize: 14,
fontSize: 13,
fontWeight: FontWeight.bold,
color: Colors.black,
),
Texts(
widget.model.lacumInformation
.identificationNo,
fontSize: 16,
fontSize: 13,
fontWeight: FontWeight.normal,
color: Colors.black,
),
@ -145,13 +145,13 @@ class _LakumBannerWidgetState extends State<LakumBannerWidget> {
children: [
Texts(TranslationBase.of(context).MEMBERSINCE,
// "MEMBER SINCE",
fontSize: 14,
fontSize: 13,
fontWeight: FontWeight.bold,
color: Colors.black,
),
Texts(
widget.model.formatCreatedDateToString(),
fontSize: 16,
fontSize: 13,
fontWeight: FontWeight.normal,
color: Colors.black,
),
@ -160,7 +160,7 @@ class _LakumBannerWidgetState extends State<LakumBannerWidget> {
],
),
SizedBox(
height: 10,
height: 5,
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
@ -170,13 +170,13 @@ class _LakumBannerWidgetState extends State<LakumBannerWidget> {
children: [
Texts(TranslationBase.of(context).lakumMobile,
// "MOBILE #",
fontSize: 14,
fontSize: 13,
fontWeight: FontWeight.bold,
color: Colors.black,
),
Texts(
widget.model.lacumGroupInformation.lakumInquiryInformationObjVersion.mobileNumber,
fontSize: 16,
fontSize: 13,
fontWeight: FontWeight.normal,
color: Colors.black,
),
@ -187,16 +187,16 @@ class _LakumBannerWidgetState extends State<LakumBannerWidget> {
children: [
Texts(
TranslationBase.of(context).language,
fontSize: 14,
fontSize: 13,
fontWeight: FontWeight.bold,
color: Colors.black,
),
Texts(
widget.model.lacumInformation.prefLang ==
"1"
"2"
? TranslationBase.of(context).lanEnglish
: TranslationBase.of(context).lanArabic,
fontSize: 16,
fontSize: 13,
fontWeight: FontWeight.normal,
color: Colors.black,
),
@ -231,11 +231,15 @@ class _LakumBannerWidgetState extends State<LakumBannerWidget> {
),
Center(
child: Container(
margin: EdgeInsets.fromLTRB(12, 70, 12, 4),
margin: EdgeInsets.fromLTRB(5, 70, 5, 4),
child: widget.model.convertBase64ToBarCodeImage() !=
null
? Image.memory(
widget.model.convertBase64ToBarCodeImage())
widget.model.convertBase64ToBarCodeImage(),
fit: BoxFit.fill,
height: 100.0,
width: 180.0
)
: Container(),
),
),

@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/model/pharmacies/order_detail.dart';
import 'package:diplomaticquarterapp/core/model/pharmacies/orders_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/order_model_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
@ -16,6 +17,7 @@ import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
import 'package:flutter/src/widgets/image.dart' as flutterImage;
import 'package:flutter_svg/flutter_svg.dart';
import 'package:provider/provider.dart';
dynamic languageID;
@ -67,6 +69,8 @@ class _OrderDetailsPageState extends State<OrderDetailsPage> {
@override
Widget build(BuildContext context) {
ProjectViewModel projectProvider = Provider.of(context);
ProjectViewModel projectViewModel = Provider.of(context);
this.context = context;
return BaseView<OrderModelViewModel>(
onModelReady: (model) {
@ -132,7 +136,7 @@ class _OrderDetailsPageState extends State<OrderDetailsPage> {
),
)
: Text(
languageID == "ar" ? model.orderListModel[0].orderStatusn.toString() : model.orderListModel[0].orderStatus.toString(),
projectProvider.isArabic ? model.orderListModel[0].orderStatusn.toString() : model.orderListModel[0].orderStatus.toString(),
style: TextStyle(
color: Colors.white,
fontSize: 13.0,
@ -337,7 +341,9 @@ class _OrderDetailsPageState extends State<OrderDetailsPage> {
itemBuilder: (context, index) {
return Container(
child: productTile(
productName: model.orderListModel[0].orderItems[index].product.name.toString(),
productName: projectViewModel.isArabic ?
model.orderListModel[0].orderItems[index].product.namen.toString()
:model.orderListModel[0].orderItems[index].product.name.toString(),
productPrice: model.orderListModel[0].orderItems[index].product.price.toString(),
productRate: model.orderListModel[0].orderItems[index].product.approvedRatingSum.toDouble(),
productReviews: model.orderListModel[0].orderItems[index].product.approvedTotalReviews,

@ -531,6 +531,8 @@ class TranslationBase {
String get expiryDate => localizedValues['expiryDate'][locale.languageCode];
String get expiryPoints => localizedValues['expiryPoints'][locale.languageCode];
String get procedureName => localizedValues['procedureName'][locale.languageCode];
String get procedure => localizedValues['procedure'][locale.languageCode];

Loading…
Cancel
Save