Merge branch 'development' into development_new_design_2.0

# Conflicts:
#	lib/uitl/translations_delegate_base.dart
#	lib/widgets/others/app_scaffold_widget.dart
merge-requests/390/head
Sikander Saleem 4 years ago
commit fab051f9e7

@ -557,6 +557,7 @@ const Map localizedValues = {
"itemsNo": {"en": "items(s)", "ar": "عناصر"},
"noOrder": {"en": "You Don't have any orders.", "ar": "ليس لديك طلبات"},
"noResult": {"en": "No Result.", "ar": "لايوجد نتئج"},
"nonRecommended": {"en": "No Recommended Products.", "ar": "لا يوجد منتجات"},
"TermsService": {"en": "Terms of Service", "ar": "شروط الخدمه"},
"Beforeusing": {"en": "Before using the checkup, please read Terms of Service.", "ar": "قبل استخدام الفحص ، يرجى قراءة شروط الخدمة"},

@ -18,7 +18,7 @@ class RecommendedProductModel {
int notApprovedRatingSum;
int approvedTotalReviews;
int notApprovedTotalReviews;
String sku;
dynamic sku;
bool isRx;
bool prescriptionRequired;
// dynamic rxMessage;

@ -665,7 +665,8 @@ class __ProductDetailPageState extends State<ProductDetailPage> {
itemCount: model.recommendedProductList.length,
itemBuilder: (context, index) {
return InkWell(
onTap: () {
onTap: ()
{
Navigator.push(
context,
FadePage(
@ -911,7 +912,15 @@ class __ProductDetailPageState extends State<ProductDetailPage> {
}),
)
: Container(
child: Text("There is no product"),
// color: Colors.white,
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
// crossAxisAlignment: CrossAxisAlignment.center,
children: [
Texts(TranslationBase.of(context).nonRecommended,
color: Colors.black,),
],
),
),
)),
),

@ -22,12 +22,16 @@ class CartOrderPage extends StatelessWidget {
final mediaQuery = MediaQuery.of(context);
final height = mediaQuery.size.height - 60 - mediaQuery.padding.top;
AppScaffold appScaffold;
return BaseView<OrderPreviewViewModel>(
onModelReady: (model) => model.getOrderPreviewData(),
onModelReady: (model){
model.getShoppingCart().then((value){
appScaffold.appBar.badgeUpdater('${model.cartResponse.itemCount ?? 0}');
});
},
builder: (_, model, wi) => ChangeNotifierProvider.value(
value: model.cartResponse,
child: AppScaffold(
child: appScaffold = AppScaffold(
appBarTitle: TranslationBase.of(context).shoppingCart,
isShowAppBar: true,
isPharmacy: true,

@ -1069,12 +1069,14 @@ class TranslationBase {
String get consumed => localizedValues['consumed'][locale.languageCode];
String get transferred => localizedValues['transferred'][locale.languageCode];
String get checkBeneficiary => localizedValues['checkBeneficiary'][locale.languageCode];
String get beneficiaryName => localizedValues['beneficiaryName'][locale.languageCode];
String get accountActivation => localizedValues['accountActivation'][locale.languageCode];
String get checkBeneficiary =>
localizedValues['checkBeneficiary'][locale.languageCode];
String get beneficiaryName =>
localizedValues['beneficiaryName'][locale.languageCode];
String get accountActivation =>
localizedValues['accountActivation'][locale.languageCode];
String get nonRecommended =>
localizedValues['nonRecommended'][locale.languageCode];
String get lakumTransfer => localizedValues['lakumTransfer'][locale.languageCode];

@ -274,6 +274,7 @@ class AppBarWidget extends StatefulWidget with PreferredSizeWidget {
Size get preferredSize => Size(double.maxFinite, 60);
}
String _badgeText = "0";
class AppBarWidgetState extends State<AppBarWidget> {
String badgeText = "0";
@override
@ -284,7 +285,7 @@ class AppBarWidgetState extends State<AppBarWidget> {
badgeUpdateBlock(String value) {
setState(() {
badgeText = value;
_badgeText = value;
});
}
@ -307,7 +308,7 @@ class AppBarWidgetState extends State<AppBarWidget> {
actions: <Widget>[
(widget.isPharmacy && widget.showPharmacyCart)
? IconButton(
icon: Badge(badgeContent: Text(badgeText), child: Icon(Icons.shopping_cart)),
icon: Badge(badgeContent: Text(_badgeText), child: Icon(Icons.shopping_cart)),
color: Colors.white,
onPressed: () {
Navigator.of(context).popUntil(ModalRoute.withName('/'));
@ -318,7 +319,7 @@ class AppBarWidgetState extends State<AppBarWidget> {
icon: Badge(
position: BadgePosition.topStart(top: -15, start: -10),
badgeContent: Text(
badgeText,
_badgeText,
style: TextStyle(fontSize: 9, color: Colors.white, fontWeight: FontWeight.normal),
),
child: Icon(Icons.shopping_cart)),

@ -7,6 +7,7 @@ import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:rating_bar/rating_bar.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
class productTile extends StatelessWidget {
final String productName;
@ -135,8 +136,10 @@ class productTile extends StatelessWidget {
children: [
IconButton(
icon: Icon(FontAwesomeIcons.trashAlt, size: 15),
onPressed: () {
deleteFromWishlistFunction(productID);
onPressed: (){
GifLoaderDialogUtils.showMyDialog(context);
deleteFromWishlistFunction(productID);
GifLoaderDialogUtils.hideDialog(context);
},
),
SizedBox(
@ -145,11 +148,14 @@ class productTile extends StatelessWidget {
IconButton(
icon: Icon(FontAwesomeIcons.shoppingCart, size: 15),
onPressed: () async {
GifLoaderDialogUtils.showMyDialog(context);
await addToCartFunction(1, productID);
GifLoaderDialogUtils.hideDialog(context);
Navigator.push(
context,
FadePage(page: CartOrderPage()),
);
},
),
],

Loading…
Cancel
Save