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

# Conflicts:
#	lib/pages/pharmacies/screens/product-details/product-name-and-price.dart
merge-requests/551/head
Fatimah Alshammari 3 years ago
commit 169ebac076

@ -546,8 +546,8 @@ const SUBSCRIBE_PRODUCT = "subscribe?";
const GET_ORDER = "orders?"; const GET_ORDER = "orders?";
const GET_ORDER_DETAILS = "orders/"; const GET_ORDER_DETAILS = "orders/";
const ADD_CUSTOMER_ADDRESS = "addcustomeraddress"; const ADD_CUSTOMER_ADDRESS = "addcustomeraddress";
const EDIT_CUSTOMER_ADDRESS = "epharmacy/api/editcustomeraddress"; const EDIT_CUSTOMER_ADDRESS = "editcustomeraddress";
const DELETE_CUSTOMER_ADDRESS = "epharmacy/api/deletecustomeraddress"; const DELETE_CUSTOMER_ADDRESS = "deletecustomeraddress";
const GET_ADDRESS = "Customers/"; const GET_ADDRESS = "Customers/";
const GET_Cancel_ORDER = "cancelorder/"; const GET_Cancel_ORDER = "cancelorder/";
const WRITE_REVIEW = "Content-Type" + "text/plain; charset=utf-8"; const WRITE_REVIEW = "Content-Type" + "text/plain; charset=utf-8";

@ -1734,4 +1734,7 @@ const Map localizedValues = {
"points": {"en": "Points", "ar": "نقاط"}, "points": {"en": "Points", "ar": "نقاط"},
"availableBalance": {"en": "Available Balance", "ar": "الرصيد المتوفر"}, "availableBalance": {"en": "Available Balance", "ar": "الرصيد المتوفر"},
"ordersDashboard": {"en": "My Orders", "ar": "طلباتي"}, "ordersDashboard": {"en": "My Orders", "ar": "طلباتي"},
"productOutOfStock": {"en": "Out Of Stock", "ar": "إنتهى من المخزن"},
"productQuantity": {"en": "Quantity", "ar": "كمية"},
}; };

@ -66,12 +66,12 @@ class CustomerAddressesService extends BaseService {
class CustomerInfo { class CustomerInfo {
bool isRegistered; bool isRegistered;
String userName; dynamic userName;
dynamic password; dynamic password;
String email; dynamic email;
dynamic errorMessage; dynamic errorMessage;
String mobileNumber; dynamic mobileNumber;
int customerId; dynamic customerId;
CustomerInfo({this.isRegistered, this.userName, this.password, this.email, this.errorMessage, this.mobileNumber, this.customerId}); CustomerInfo({this.isRegistered, this.userName, this.password, this.email, this.errorMessage, this.mobileNumber, this.customerId});
@ -104,7 +104,7 @@ class AddressInfo {
String lastName; String lastName;
String email; String email;
dynamic company; dynamic company;
int countryId; dynamic countryId;
String country; String country;
dynamic stateProvinceId; dynamic stateProvinceId;
String city; String city;

@ -75,7 +75,6 @@ class PharmacyAddressesViewModel extends BaseViewModel {
sendingAddress.faxNumber = user.faxNumber; sendingAddress.faxNumber = user.faxNumber;
sendingAddress.customerAttributes = ""; sendingAddress.customerAttributes = "";
sendingAddress.createdOnUtc = DateTime.now().toString(); sendingAddress.createdOnUtc = DateTime.now().toString();
if (editedAddress == null) { if (editedAddress == null) {
///TODO Fatima* ///TODO Fatima*
@ -83,15 +82,21 @@ class PharmacyAddressesViewModel extends BaseViewModel {
} else { } else {
await _pharmacyAddressService.editCustomerAddress(sendingAddress); await _pharmacyAddressService.editCustomerAddress(sendingAddress);
} }
if (_pharmacyAddressService.hasError) { if (_pharmacyAddressService.hasError) {
error = _pharmacyAddressService.error; await _pharmacyAddressService.getAddresses();
Utils.showErrorToast(error); setState(ViewState.Idle);
setState(ViewState.Error);
// setState(ViewState.Error);
} else { } else {
setState(ViewState.Idle); setState(ViewState.Idle);
} }
} }
Future deleteAddresses(AddressInfo sendingAddress) async { Future deleteAddresses(AddressInfo sendingAddress) async {

@ -10,6 +10,7 @@ import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import '../../../../../locator.dart'; import '../../../../../locator.dart';
@ -28,8 +29,13 @@ class FooterWidget extends StatefulWidget {
int quantity; int quantity;
bool isOverQuantity; bool isOverQuantity;
FooterWidget(this.isAvailable, this.maxQuantity, this.minQuantity, this.quantityLimit, this.item, FooterWidget(this.isAvailable, this.maxQuantity, this.minQuantity,
{this.quantity, this.isOverQuantity = false, this.addToCartFunction, this.addToShoppingCartFunction, this.model}); this.quantityLimit, this.item,
{this.quantity,
this.isOverQuantity = false,
this.addToCartFunction,
this.addToShoppingCartFunction,
this.model});
@override @override
_FooterWidgetState createState() => _FooterWidgetState(); _FooterWidgetState createState() => _FooterWidgetState();
@ -38,7 +44,8 @@ class FooterWidget extends StatefulWidget {
class _FooterWidgetState extends State<FooterWidget> { class _FooterWidgetState extends State<FooterWidget> {
double quantityUI = 80; double quantityUI = 80;
bool showUI = false; bool showUI = false;
AuthenticatedUserObject authenticatedUserObject = locator<AuthenticatedUserObject>(); AuthenticatedUserObject authenticatedUserObject =
locator<AuthenticatedUserObject>();
AppSharedPreferences sharedPref = new AppSharedPreferences(); AppSharedPreferences sharedPref = new AppSharedPreferences();
@override @override
@ -74,7 +81,8 @@ class _FooterWidgetState extends State<FooterWidget> {
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Text( child: Text(
TranslationBase.of(context).quantity, TranslationBase.of(context).quantity,
style: TextStyle(fontSize: 15, fontWeight: FontWeight.bold), style: TextStyle(
fontSize: 15, fontWeight: FontWeight.bold),
), ),
), ),
InkWell( InkWell(
@ -97,7 +105,11 @@ class _FooterWidgetState extends State<FooterWidget> {
SizedBox( SizedBox(
width: 5, width: 5,
), ),
for (int i = 1; i <= 10; i++) QuantityBox(label: i, onTapFunc: onChangeValue, isSelected: widget.quantity == i), for (int i = 1; i <= 10; i++)
QuantityBox(
label: i,
onTapFunc: onChangeValue,
isSelected: widget.quantity == i),
Container( Container(
width: 100, width: 100,
decoration: BoxDecoration( decoration: BoxDecoration(
@ -105,14 +117,16 @@ class _FooterWidgetState extends State<FooterWidget> {
color: Colors.white, color: Colors.white,
), ),
child: TextField( child: TextField(
decoration: InputDecoration(labelText: ' Quantity # '), decoration: InputDecoration(
labelText: ' Quantity # '),
onChanged: (text) { onChanged: (text) {
if (int.tryParse(text) == null) { if (int.tryParse(text) == null) {
text = ''; text = '';
} else { } else {
setState(() { setState(() {
widget.quantity = int.parse(text); widget.quantity = int.parse(text);
if (widget.quantity >= widget.quantityLimit) { if (widget.quantity >=
widget.quantityLimit) {
widget.isOverQuantity = true; widget.isOverQuantity = true;
} else { } else {
widget.isOverQuantity = false; widget.isOverQuantity = false;
@ -133,31 +147,50 @@ class _FooterWidgetState extends State<FooterWidget> {
height: 20, height: 20,
), ),
Container( Container(
height: 55, height: 58,
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Container( Container(
width: 90,
height: 60, height: 60,
child: FlatButton( child: FlatButton(
child: Column( child: Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
Expanded( Column(
flex: 4, mainAxisAlignment: MainAxisAlignment.center,
child: Text( crossAxisAlignment: CrossAxisAlignment.start,
widget.quantity.toString(), children: [
style: TextStyle(fontSize: 20), AppText(
), TranslationBase.of(context).productQuantity,
fontSize: 10,
),
Row(
children: [
AppText(
widget.quantity.toString(),
fontSize: 16,
fontWeight: FontWeight.bold,
),
SizedBox(
width: 20,
),
Icon(Icons.keyboard_arrow_down,color: Color(0xFF2E303A),size: 25,)
],
),
],
), ),
Expanded( SizedBox(
flex: 5, width: 10,
child: Text( ),
TranslationBase.of(context).quantityShortcut, SizedBox(
style: TextStyle(fontSize: 16), height: 40,
width: 1,
child: Container(
color: Color(0xFFEFEFEF),
), ),
), ),
], ],
@ -184,17 +217,22 @@ class _FooterWidgetState extends State<FooterWidget> {
width: MediaQuery.of(context).size.width * 0.35, width: MediaQuery.of(context).size.width * 0.35,
child: SecondaryButton( child: SecondaryButton(
label: TranslationBase.of(context).addToCart.toUpperCase(), label: TranslationBase.of(context).addToCart.toUpperCase(),
disabled: (!widget.isAvailable && widget.quantity > 0) || widget.quantity > widget.quantityLimit || widget.item.isRx, disabled: (!widget.isAvailable && widget.quantity > 0) ||
widget.quantity > widget.quantityLimit ||
widget.item.isRx,
onTap: () async { onTap: () async {
if (!authenticatedUserObject.isLogin) { if (!authenticatedUserObject.isLogin) {
login(); login();
} else } else
await widget.addToCartFunction(quantity: widget.quantity, itemID: widget.item.id, model: widget.model); await widget.addToCartFunction(
quantity: widget.quantity,
itemID: widget.item.id,
model: widget.model);
}, },
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
borderColor: Color(0xFF4CAF50), borderColor: Color(0xFF4CAF50).withOpacity(0.7),
borderRadius: 3, borderRadius: 6,
color: Color(0xFF4CAF50), color: Color(0xFF5AB145).withOpacity(0.7),
), ),
), ),
SizedBox( SizedBox(
@ -204,19 +242,28 @@ class _FooterWidgetState extends State<FooterWidget> {
width: MediaQuery.of(context).size.width * 0.35, width: MediaQuery.of(context).size.width * 0.35,
child: SecondaryButton( child: SecondaryButton(
label: TranslationBase.of(context).buyNow.toUpperCase(), label: TranslationBase.of(context).buyNow.toUpperCase(),
disabled: (!widget.isAvailable && widget.quantity > 0) || (widget.quantity > widget.quantityLimit) || widget.item.isRx, disabled: (!widget.isAvailable && widget.quantity > 0) ||
(widget.quantity > widget.quantityLimit) ||
widget.item.isRx,
onTap: () async { onTap: () async {
if (!authenticatedUserObject.isLogin) { if (!authenticatedUserObject.isLogin) {
login(); login();
} else { } else {
await widget.addToShoppingCartFunction(quantity: widget.quantity, itemID: widget.item.id, model: widget.model); await widget.addToShoppingCartFunction(
quantity: widget.quantity,
itemID: widget.item.id,
model: widget.model);
} }
}, },
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
borderColor: Colors.grey[800], borderColor: Colors.grey[800].withOpacity(0.7),
borderRadius: 3, borderRadius: 6,
disableColor: Colors.grey[700], disableColor: Colors.grey[700],
color: !widget.isAvailable && widget.quantity > 0 || widget.quantity > widget.quantityLimit || widget.item.isRx ? Colors.grey : Colors.grey[800], color: !widget.isAvailable && widget.quantity > 0 ||
widget.quantity > widget.quantityLimit ||
widget.item.isRx
? Color(0xFF535353).withOpacity(0.7)
: Colors.grey[800],
), ),
), ),
], ],
@ -239,7 +286,9 @@ class _FooterWidgetState extends State<FooterWidget> {
Navigator.of(context).pushNamed(CONFIRM_LOGIN); Navigator.of(context).pushNamed(CONFIRM_LOGIN);
} else { } else {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
authService.selectDeviceImei(DEVICE_TOKEN).then((SelectDeviceIMEIRES value) { authService
.selectDeviceImei(DEVICE_TOKEN)
.then((SelectDeviceIMEIRES value) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
if (value != null) { if (value != null) {
setUserValues(value); setUserValues(value);

@ -13,6 +13,7 @@ import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
@ -121,12 +122,39 @@ class __ProductDetailPageState extends State<ProductDetailPage> {
child: Column( child: Column(
children: [ children: [
if (widget.product.images.isNotEmpty) if (widget.product.images.isNotEmpty)
Container( Stack(
height: MediaQuery.of(context).size.height * .40, children: [
child: Image.network( Container(
widget.product.images[0].src.trim(), height: MediaQuery.of(context).size.height * .40,
fit: BoxFit.contain, child: Center(
), child: Image.network(
widget.product.images[0].src.trim(),
fit: BoxFit.contain,
),
),
),
if(model.isStockAvailable!= null && !model.isStockAvailable)
Container(
height: MediaQuery.of(context).size.height * .40,
color: Colors.white.withOpacity(0.75),
// child: AppText("Out of Stock"),
),
if(model.isStockAvailable!= null && !model.isStockAvailable)
Positioned(
// bottom: 10,
top: MediaQuery.of(context).size.height *.088,
left: MediaQuery.of(context).size.width *.32,
child: Center(
child: Container(
height: MediaQuery.of(context).size.height * .40,
// color: Colors.white.withOpacity(0.75),
child: RotationTransition(
turns: new AlwaysStoppedAnimation(310 / 360),
child: AppText(TranslationBase.of(context).productOutOfStock ,color:Color(0xFF000000).withOpacity(0.1),fontSize: projectViewModel.isArabic?40: 50, fontWeight: FontWeight.bold ,)),
),
),
),
],
), ),
if (widget.product.discountDescription != null) DiscountDescription(product: widget.product) if (widget.product.discountDescription != null) DiscountDescription(product: widget.product)
], ],
@ -251,7 +279,7 @@ class __ProductDetailPageState extends State<ProductDetailPage> {
Column( Column(
children: [ children: [
FlatButton( FlatButton(
onPressed: model.isStockAvailable onPressed: model.isStockAvailable !=null && model.isStockAvailable
? () async { ? () async {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
await model.getProductLocationData(widget.product.sku); await model.getProductLocationData(widget.product.sku);

@ -23,10 +23,17 @@ class ProductNameAndPrice extends StatefulWidget {
final bool isStockAvailable; final bool isStockAvailable;
final String stockAvailability; final String stockAvailability;
AuthenticatedUserObject authenticatedUserObject = locator<AuthenticatedUserObject>(); AuthenticatedUserObject authenticatedUserObject =
locator<AuthenticatedUserObject>();
ProductNameAndPrice(this.context, this.item, ProductNameAndPrice(this.context, this.item,
{this.customerId, this.isInWishList, this.notifyMeWhenAvailable, this.addToWishlistFunction, this.deleteFromWishlistFunction, this.isStockAvailable = true, this.stockAvailability}); {this.customerId,
this.isInWishList,
this.notifyMeWhenAvailable,
this.addToWishlistFunction,
this.deleteFromWishlistFunction,
this.isStockAvailable = true,
this.stockAvailability});
@override @override
_ProductNameAndPriceState createState() => _ProductNameAndPriceState(); _ProductNameAndPriceState createState() => _ProductNameAndPriceState();
@ -45,90 +52,113 @@ class _ProductNameAndPriceState extends State<ProductNameAndPrice> {
SizedBox( SizedBox(
height: 10, height: 10,
), ),
widget.item.rxMessage != null widget.item.rxMessage != null
? Container( ? Container(
// width: widget.item.rxMessage != null ? MediaQuery.of(context).size.width / 2.8 : 0, // width: widget.item.rxMessage != null ? MediaQuery.of(context).size.width / 2.8 : 0,
width: double.infinity, width: double.infinity,
height: 40, height: 40,
padding: EdgeInsets.all(4), padding: EdgeInsets.all(4),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Color(0xffD02127), color: Color(0xffD02127),
// color: Colors.red[700] // color: Colors.red[700]
// borderRadius: BorderRadius.only(topLeft: Radius.circular(6)), // borderRadius: BorderRadius.only(topLeft: Radius.circular(6)),
),
child: Row(
children: [
Padding(
padding: const EdgeInsets.only(left: 8, right: 8),
child: Icon(
Icons.warning,
color: Colors.white,
), ),
), child: Row(
Text( children: [
projectViewModel.isArabic ? widget.item.rxMessagen.toString() : widget.item.rxMessage.toString(), Padding(
style: TextStyle(color: Colors.white, padding: const EdgeInsets.only(left: 8, right: 8),
// regular: true, child: Icon(
fontSize: 17, Icons.warning,
fontWeight: FontWeight.w600, letterSpacing:-0.68 color: Colors.white,
// textAlign: TextAlign.center, ),
) ),
), Text(
], projectViewModel.isArabic
) ? widget.item.rxMessagen.toString()
) : widget.item.rxMessage.toString(),
: Container(), style: TextStyle(
color: Colors.white,
// regular: true,
fontSize: 17,
fontWeight: FontWeight.w600,
letterSpacing:-0.68
// textAlign: TextAlign.center,
)),
],
))
: Container(),
FractionallySizedBox( FractionallySizedBox(
widthFactor: 0.93, widthFactor: 0.93,
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
// Texts(widget.item.price.toString() + " " + TranslationBase.of(context).sar, fontWeight: FontWeight.bold, fontSize: 20), // Texts(widget.item.price.toString() + " " + TranslationBase.of(context).sar, fontWeight: FontWeight.bold, fontSize: 20),
Container( if (widget.stockAvailability != null)
margin: EdgeInsets.only(top: 10.0, right: 10.0), Container(
padding: EdgeInsets.only(left: 11, right: 11,), margin: EdgeInsets.only(top: 10.0, right: 10.0),
decoration: BoxDecoration( padding: EdgeInsets.only(
border: Border.all( left: 11.0, right: 11.0, top: 0, bottom: 0),
decoration: BoxDecoration(
border: Border.all(
color: getStatusBackgroundColor(),
style: BorderStyle.solid,
width: 5.0,
),
color: getStatusBackgroundColor(), color: getStatusBackgroundColor(),
style: BorderStyle.solid, borderRadius: BorderRadius.circular(30.0)),
width: 5.0, // child: Text(
), // widget.stockAvailability,
color: getStatusBackgroundColor(), // style: TextStyle(
borderRadius: BorderRadius.circular(30.0)), // fontWeight: FontWeight.w600,
child: Text( // fontSize: 11,
widget.stockAvailability, // color: Color(0xffFFFFFF),
style: TextStyle(fontWeight: FontWeight.w600, fontSize: 11, color: Color(0xffFFFFFF),letterSpacing:-0.44), // ),
// color: getStatusBackgroundColor(),
// borderRadius: BorderRadius.circular(30.0)),
child: Text(
widget.stockAvailability,
style: TextStyle(fontWeight: FontWeight.w600, fontSize: 11, color: Color(0xffFFFFFF),letterSpacing:-0.44)),
//color: widget.isStockAvailable ? Colors.white : Colors.red, //color: widget.isStockAvailable ? Colors.white : Colors.red,
), ),
),
// SizedBox(width: 20), // SizedBox(width: 20),
if (widget.authenticatedUserObject.isLogin) // if (
!widget.isStockAvailable && widget.customerId != null widget.authenticatedUserObject.isLogin &&
?IconButton( widget.stockAvailability != null &&
iconSize: 25, !widget.isStockAvailable &&
icon:Icon(Icons.notifications_active), widget.customerId != null
color: new Color(0xff2E303A), ? IconButton(
onPressed: () iconSize: 25,
{ widget.notifyMeWhenAvailable(context, widget.item.id);}, icon: Icon(Icons.notifications_active),
color: new Color(0xff2E303A),
): IconButton( onPressed: () {
icon: Icon(!widget.isInWishList ? Icons.favorite_border : Icons.favorite), widget.notifyMeWhenAvailable(
color: !widget.isInWishList ? Color(0xff2E303A) : Color(0xffD02127), context, widget.item.id);
onPressed: () async { },
{ )
if (widget.customerId != null) { : IconButton(
if (!widget.isInWishList) { icon: Icon(!widget.isInWishList
await widget.addToWishlistFunction(widget.item.id); ? Icons.favorite_border
} else { : Icons.favorite),
await widget.deleteFromWishlistFunction(widget.item.id); color: !widget.isInWishList
} ? Color(0xff2E303A)
} else { : Color(0xffD02127),
return; onPressed: () async {
} {
setState(() {}); if (widget.customerId != null) {
} if (!widget.isInWishList) {
}, await widget
) .addToWishlistFunction(widget.item.id);
} else {
await widget.deleteFromWishlistFunction(
widget.item.id);
}
} else {
return;
}
setState(() {});
}
},
)
// BorderedButton( // BorderedButton(
// TranslationBase.of(context).notifyMe, // TranslationBase.of(context).notifyMe,
// hasBorder: true, // hasBorder: true,
@ -177,31 +207,45 @@ class _ProductNameAndPriceState extends State<ProductNameAndPrice> {
), ),
), ),
Padding( Padding(
padding: const EdgeInsets.only(left: 8,right: 8, top: 1, bottom: 12), padding:
const EdgeInsets.only(left: 8, right: 8, top: 1, bottom: 12),
child: Container( child: Container(
margin: EdgeInsets.only(left: 10, right: 10), margin: EdgeInsets.only(left: 10, right: 10),
child: Align( child: Align(
alignment: projectViewModel.isArabic ? Alignment.topRight : Alignment.topLeft, alignment: projectViewModel.isArabic
? Alignment.topRight
: Alignment.topLeft,
child: Text( child: Text(
projectViewModel.isArabic ? widget.item.namen : widget.item.name, projectViewModel.isArabic
style: TextStyle( fontWeight: FontWeight.w600, fontSize: 16, letterSpacing:-0.96), ? widget.item.namen
: widget.item.name,
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: 16,
letterSpacing: -0.96),
), ),
), ),
), ),
), ),
Padding( Padding(
padding: const EdgeInsets.only(left: 8,right: 8), padding: const EdgeInsets.only(left: 8, right: 8),
child: Container( child: Container(
margin: EdgeInsets.only(left: 10, right: 10), margin: EdgeInsets.only(left: 10, right: 10),
child: Align( child: Align(
alignment: projectViewModel.isArabic ? Alignment.topRight : Alignment.topLeft, alignment: projectViewModel.isArabic
child: Text( TranslationBase.of(context).sar+ " " + ? Alignment.topRight
widget.item.price.toString(), : Alignment.topLeft,
style: TextStyle(fontWeight: FontWeight.bold, fontSize: 19, letterSpacing:-0.76),), child: Text(
TranslationBase.of(context).sar +
" " +
widget.item.price.toString(),
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 19,
letterSpacing: -0.76),
),
), ),
), ),
), ),
FractionallySizedBox( FractionallySizedBox(
widthFactor: 0.95, widthFactor: 0.95,
@ -214,7 +258,8 @@ class _ProductNameAndPriceState extends State<ProductNameAndPrice> {
child: Row( child: Row(
children: [ children: [
RatingBar.readOnly( RatingBar.readOnly(
initialRating: double.parse(widget.item.approvedRatingSum.toString()), initialRating: double.parse(
widget.item.approvedRatingSum.toString()),
size: 18.0, size: 18.0,
filledColor: Color(0XFFD02127), filledColor: Color(0XFFD02127),
emptyColor: Color(0XFFD02127), emptyColor: Color(0XFFD02127),
@ -236,7 +281,8 @@ class _ProductNameAndPriceState extends State<ProductNameAndPrice> {
// ), // ),
Text( Text(
"(${widget.item.approvedTotalReviews}${TranslationBase.of(context).review})", "(${widget.item.approvedTotalReviews}${TranslationBase.of(context).review})",
style: TextStyle(fontWeight: FontWeight.w600, fontSize: 12), style: TextStyle(
fontWeight: FontWeight.w600, fontSize: 12),
), ),
SizedBox( SizedBox(
width: 70, width: 70,
@ -268,6 +314,7 @@ class _ProductNameAndPriceState extends State<ProductNameAndPrice> {
Color getStatusBackgroundColor() { Color getStatusBackgroundColor() {
if (widget.isStockAvailable) if (widget.isStockAvailable)
return Color(0xFF5AB145); return Color(0xFF5AB145);
else return Color(0xFFD02127); else
return Color(0xFFD02127);
} }
} }

@ -57,10 +57,11 @@ class ProductAppBar extends StatelessWidget with PreferredSizeWidget {
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
Row( Row(
// mainAxisAlignment: MainAxisAlignment.start,
children: [ children: [
IconWithBg( IconWithBg(
icon: Icons.arrow_back, icon: Icons.arrow_back_ios,
color: Colors.grey, color: Color(0xFF2B353E),
onPress: () { onPress: () {
Navigator.pop(context); Navigator.pop(context);
}, },
@ -74,7 +75,7 @@ class ProductAppBar extends StatelessWidget with PreferredSizeWidget {
children: [ children: [
IconWithBg( IconWithBg(
icon: Icons.shopping_cart, icon: Icons.shopping_cart,
color: Colors.grey[800], color: Color(0xFF2B353E),
onPress: () { onPress: () {
Navigator.pushAndRemoveUntil( Navigator.pushAndRemoveUntil(
locator<NavigationService>() locator<NavigationService>()
@ -112,7 +113,7 @@ class ProductAppBar extends StatelessWidget with PreferredSizeWidget {
.quantityCount .quantityCount
.toString(), .toString(),
style: "caption", style: "caption",
medium: true, // medium: true,
color: Colors.white, color: Colors.white,
)), )),
), ),
@ -124,7 +125,7 @@ class ProductAppBar extends StatelessWidget with PreferredSizeWidget {
), ),
IconWithBg( IconWithBg(
icon: FontAwesomeIcons.ellipsisV, icon: FontAwesomeIcons.ellipsisV,
color: Colors.grey, color: Color(0xFF2B353E),
onPress: () { onPress: () {
settingModalBottomSheet(context); settingModalBottomSheet(context);
}, },

@ -1,15 +1,23 @@
import 'package:auto_size_text/auto_size_text.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyProduct.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyProduct.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/pharmacies/screens/product-details/product-detail.dart'; import 'package:diplomaticquarterapp/pages/pharmacies/screens/product-details/product-detail.dart';
import 'package:diplomaticquarterapp/pages/pharmacies/screens/product-details/shared/icon_with_bg.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/StarRating.dart'; import 'package:diplomaticquarterapp/widgets/others/StarRating.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:rating_bar/rating_bar.dart'; import 'package:rating_bar/rating_bar.dart';
import 'dart:math' as math;
class ProductTileItem extends StatelessWidget { class ProductTileItem extends StatelessWidget {
final AppSharedPreferences sharedPref = AppSharedPreferences(); final AppSharedPreferences sharedPref = AppSharedPreferences();
final PharmacyProduct item; final PharmacyProduct item;
@ -38,13 +46,13 @@ class ProductTileItem extends StatelessWidget {
}); });
} }
if(items.length >= 15){ if (items.length >= 15) {
items.removeAt(0); items.removeAt(0);
// lastVisited = lastVisited.replaceFirst(RegExp('$itemToRemove'), ''); // lastVisited = lastVisited.replaceFirst(RegExp('$itemToRemove'), '');
} }
lastVisited = ""; lastVisited = "";
for(int i = items.length - 1; i >= 0; i--){ for (int i = items.length - 1; i >= 0; i--) {
if (lastVisited == "") { if (lastVisited == "") {
// it means there is no lastVisited yet // it means there is no lastVisited yet
lastVisited = "${items[i]}"; lastVisited = "${items[i]}";
@ -54,7 +62,6 @@ class ProductTileItem extends StatelessWidget {
} }
} }
if (!isIdExist) { if (!isIdExist) {
if (lastVisited == "") { if (lastVisited == "") {
// it means there is no lastVisited yet // it means there is no lastVisited yet
@ -76,80 +83,157 @@ class ProductTileItem extends StatelessWidget {
child: Container( child: Container(
margin: EdgeInsets.all(7), margin: EdgeInsets.all(7),
decoration: BoxDecoration( decoration: BoxDecoration(
border:Border.all(color: Colors.grey.shade300,width: 0.5), border: Border.all(color: Colors.grey.shade300, width: 0.5),
borderRadius: BorderRadius.circular(8) borderRadius: BorderRadius.circular(8)),
),
padding: EdgeInsets.symmetric(horizontal: 4), padding: EdgeInsets.symmetric(horizontal: 4),
width: MediaQuery.of(context).size.width / 2.8, width: MediaQuery.of(context).size.width / 2.8,
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Stack( // Stack(
children: [ // children: [
Container( // Container(
margin: EdgeInsets.fromLTRB(0, 0, 0, 0), // margin: EdgeInsets.fromLTRB(0, 0, 0, 0),
alignment: Alignment.center, // alignment: Alignment.center,
child: (item.images != null && item.images.length > 0) // child: (item.images != null && item.images.length > 0)
? Image.network( // ? Image.network(
item.images[0].src, // item.images[0].src,
fit: BoxFit.cover, // fit: BoxFit.cover,
height: itemHeight / 2, // height: itemHeight / 2,
) // )
: Image.asset( // : Image.asset(
"assets/images/no_image.png", // "assets/images/no_image.png",
fit: BoxFit.cover, // fit: BoxFit.cover,
height: itemHeight / 2, // height: itemHeight / 2,
// ),
// ),
// ],
// ),
Container(
width: double.infinity,
height: MediaQuery.of(context).size.width * 0.3,
padding:
EdgeInsets.only(left: 20, right: 20, top: 14, bottom: 14),
color: Colors.white,
child: InkWell(
onTap: () {},
child: Container(
width: double.infinity,
height: double.infinity,
clipBehavior: Clip.antiAlias,
decoration: containerRadiusWithGradientServices(33,
lightColor: Colors.transparent,
darkColor: Colors.transparent),
child: Stack(
children: [
Container(
width: double.infinity,
height: double.infinity,
//clipBehavior: Clip.antiAlias,
// decoration: projectProvider.isArabic
// ? containerBottomRightRadiusWithGradientForAr(0, lightColor: Colors.transparent, darkColor: Colors.transparent)
// : containerBottomRightRadiusWithGradient(0, lightColor: Colors.red, darkColor: CustomColors.green),
child: Stack(
children: [
Container(
margin: EdgeInsets.fromLTRB(0, 0, 0, 0),
alignment: Alignment.center,
child: (item.images != null &&
item.images.length > 0)
? Image.network(
item.images[0].src,
fit: BoxFit.cover,
height: itemHeight / 2,
)
: Image.asset(
"assets/images/no_image.png",
fit: BoxFit.cover,
height: itemHeight / 2,
),
),
],
),
),
if (item.rxMessage != null)
projectProvider.isArabic
? Positioned(
right: -16,
top: 2,
child: Transform.rotate(
angle: math.pi / 4,
child: Container(
padding: EdgeInsets.only(
left: 18, right: 18, top: 6, bottom: 3),
color: CustomColors.accentColor,
child: Padding(
padding: EdgeInsets.all(2.0),
child: Text(
"الوصفة\n مطلوبة",
style: TextStyle(
color: Colors.white,
fontSize: 7.5,
height: 0.8,
fontWeight: FontWeight.bold,
letterSpacing: -0.27,
),
),
),
),
),
)
: Positioned(
left: -24,
top: 2,
child: Transform.rotate(
angle: -math.pi / 4,
child: Container(
padding: EdgeInsets.only(
left: 18, right: 18, top: 6, bottom: 3),
color: CustomColors.accentColor,
child: Text(
"\n E-Prescription \n Is required",
style: TextStyle(
color: Colors.white,
fontSize: 7.5,
//letterSpacing: -0.27,
height: 1.2,
fontWeight: FontWeight.w600,
),
),
),
),
),
],
), ),
), ),
// Container( ),
// width: item.rxMessage != null
// ? MediaQuery.of(context).size.width / 5
// : 0,
// padding: EdgeInsets.all(4),
// decoration: BoxDecoration(
// color: Color(0xffb23838),
// borderRadius:
// BorderRadius.only(topLeft: Radius.circular(6)),
// ),
// child: item.rxMessage != null
// ? Texts(
// projectProvider.isArabic
// ? item.rxMessagen
// : item.rxMessage,
// color: Colors.white,
// regular: true,
// fontSize: 10,
// fontWeight: FontWeight.w400,
// )
// : Texts(""),
// )
],
), ),
Padding(
padding: EdgeInsets.fromLTRB(1,1,1,1),
child: Container(
width: item.rxMessage != null
? MediaQuery.of(context).size.width / 1.0
: 0,
padding: EdgeInsets.fromLTRB(8,2,8,2),
decoration: BoxDecoration(
color: Color(0xffb23838),
), // Padding(
child: item.rxMessage != null // padding: EdgeInsets.fromLTRB(1, 1, 1, 1),
? Texts( // child: Container(
projectProvider.isArabic // width: item.rxMessage != null
? item.rxMessagen // ? MediaQuery.of(context).size.width / 1.0
: item.rxMessage, // : 0,
color: Colors.white, // padding: EdgeInsets.fromLTRB(8, 2, 8, 2),
regular: true, // decoration: BoxDecoration(
fontSize: 10, // color: Color(0xffb23838),
fontWeight: FontWeight.w400, // ),
) // child: item.rxMessage != null
: Texts(""), // ? Texts(
), // projectProvider.isArabic
), // ? item.rxMessagen
// SizedBox(height: 4,), // : item.rxMessage,
// color: Colors.white,
// regular: true,
// fontSize: 10,
// fontWeight: FontWeight.w400,
// )
// : Texts(""),
// ),
// ),
// SizedBox(height: 4,),
Padding( Padding(
padding: const EdgeInsets.symmetric(horizontal: 4.0), padding: const EdgeInsets.symmetric(horizontal: 4.0),
child: Texts( child: Texts(
@ -179,23 +263,32 @@ class ProductTileItem extends StatelessWidget {
), ),
Row( Row(
children: [ children: [
// Expanded( // Expanded(
RatingBar.readOnly( RatingBar.readOnly(
initialRating: item.approvedRatingSum.toDouble(), initialRating: item.approvedRatingSum.toDouble(),
size: 15.0, size: 15.0,
filledColor: Colors.yellow[700], filledColor: Color(0xffD02127),
emptyColor: Colors.grey[500], emptyColor: Colors.grey[500],
isHalfAllowed: true, isHalfAllowed: true,
halfFilledIcon: Icons.star_half, halfFilledIcon: Icons.star_half,
filledIcon: Icons.star, filledIcon: Icons.star,
emptyIcon: Icons.star, emptyIcon: Icons.star,
), ),
Texts( Texts(
"(${item.approvedTotalReviews})", "(${item.approvedTotalReviews})",
regular: true, regular: true,
fontSize: 10, fontSize: 10,
fontWeight: FontWeight.w400, fontWeight: FontWeight.w400,
) ),
SizedBox(
width: 20.0,
),
Icon(
Icons.arrow_forward,
size: 18,
),
// StarRating( // StarRating(
// totalAverage: item.approvedTotalReviews > 0 // totalAverage: item.approvedTotalReviews > 0
// ? (item.approvedRatingSum.toDouble() / // ? (item.approvedRatingSum.toDouble() /
@ -203,14 +296,16 @@ class ProductTileItem extends StatelessWidget {
// .toDouble() // .toDouble()
// : 0, // : 0,
// forceStars: true), // forceStars: true),
// ), // ),
], ],
), ),
], ],
), ),
), ),
), ),
SizedBox(height: 5,), SizedBox(
height: 5,
),
], ],
), ),
), ),

@ -28,15 +28,17 @@ class BestSellerWidget extends StatelessWidget {
productType: 20, productType: 20,
)), )),
if (model.state != ViewState.BusyLocal) if (model.state != ViewState.BusyLocal)
Container( Container(
height: MediaQuery.of(context).size.height / 3 + 20, height: MediaQuery.of(context).size.height / 3 + 20,
child: ListView.builder( child: ListView.builder(
itemBuilder: (ctx, i) => itemBuilder: (ctx, i) => ProductTileItem(
ProductTileItem(model.bestSellerProduct[i], MediaQuery.of(context).size.height / 4 + 20), model.bestSellerProduct[i],
scrollDirection: Axis.horizontal, MediaQuery.of(context).size.height / 4 + 20),
itemCount: model.bestSellerProduct.length, scrollDirection: Axis.horizontal,
), itemCount: model.bestSellerProduct.length,
) else ),
)
else
Container( Container(
height: 80, height: 80,
child: Center( child: Center(

@ -5,6 +5,7 @@ import 'package:diplomaticquarterapp/pages/final_products_page.dart';
import 'package:diplomaticquarterapp/pages/pharmacies/widgets/ProductTileItem.dart'; import 'package:diplomaticquarterapp/pages/pharmacies/widgets/ProductTileItem.dart';
import 'package:diplomaticquarterapp/pages/pharmacies/widgets/home/ViewAllHomeWidget.dart'; import 'package:diplomaticquarterapp/pages/pharmacies/widgets/home/ViewAllHomeWidget.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/network_base_view.dart'; import 'package:diplomaticquarterapp/widgets/others/network_base_view.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';

@ -18,42 +18,46 @@ class RecentlyViewedWidget extends StatelessWidget {
builder: (_, model, wi) => NetworkBaseView( builder: (_, model, wi) => NetworkBaseView(
isLocalLoader: true, isLocalLoader: true,
baseViewModel: model, baseViewModel: model,
child: model.lastVisitedProducts.isNotEmpty ? Container( child: model.lastVisitedProducts.isNotEmpty
child: Column( ? Container(
children: [ child: Column(
ViewAllHomeWidget( children: [
TranslationBase.of(context).recentlyViewed, ViewAllHomeWidget(
FinalProductsPage( TranslationBase.of(context).recentlyViewed,
id: "", FinalProductsPage(
productType: 3, id: "",
)), productType: 3,
if (model.state != ViewState.BusyLocal) )),
Container( if (model.state != ViewState.BusyLocal)
height: model.lastVisitedProducts.length > 0 Container(
? MediaQuery.of(context).size.height / 3 + 20 height: model.lastVisitedProducts.length > 0
: 0, ? MediaQuery.of(context).size.height / 3 + 20
child: ListView.builder( : 0,
itemBuilder: (ctx, i) => child: ListView.builder(
ProductTileItem(model.lastVisitedProducts[i], MediaQuery.of(context).size.height / 4 + 20), itemBuilder: (ctx, i) => ProductTileItem(
scrollDirection: Axis.horizontal, model.lastVisitedProducts[i],
itemCount: model.lastVisitedProducts.length, MediaQuery.of(context).size.height / 4 +
), 20),
) scrollDirection: Axis.horizontal,
else itemCount: model.lastVisitedProducts.length,
Container( ),
height: 80, )
child: Center( else
child:CircularProgressIndicator( Container(
backgroundColor: Colors.white, height: 80,
valueColor: AlwaysStoppedAnimation<Color>( child: Center(
Colors.grey[500], child: CircularProgressIndicator(
backgroundColor: Colors.white,
valueColor: AlwaysStoppedAnimation<Color>(
Colors.grey[500],
),
),
),
), ),
), ],
),
), ),
], )
), : Container(),
) : Container(),
)); ));
} }
} }

@ -4,11 +4,9 @@ import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class ViewAllHomeWidget extends StatelessWidget { class ViewAllHomeWidget extends StatelessWidget {
final String title; final String title;
final Widget navigationWidget; final Widget navigationWidget;
ViewAllHomeWidget(this.title, this.navigationWidget); ViewAllHomeWidget(this.title, this.navigationWidget);
@override @override
@ -23,22 +21,32 @@ class ViewAllHomeWidget extends StatelessWidget {
bold: true, bold: true,
fontSize: 16, fontSize: 16,
), ),
BorderedButton( InkWell(
TranslationBase.of(context).viewAll, onTap: () {
hasBorder: true, Navigator.push(context,
borderColor: Colors.green, MaterialPageRoute(builder: (context) => navigationWidget));
textColor: Colors.green,
fontWeight: FontWeight.bold,
vPadding: 6,
hPadding: 14,
handler: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) =>
navigationWidget));
}, },
child: Texts(
TranslationBase.of(context).viewAll,
color: Color(0xffD02127),
decoration: TextDecoration.underline,
fontWeight: FontWeight.w600,
fontSize: 12.0,
),
), ),
// BorderedButton(
// TranslationBase.of(context).viewAll,
// hasBorder: true,
// borderColor: Colors.green,
// textColor: Colors.green,
// fontWeight: FontWeight.bold,
// vPadding: 6,
// hPadding: 14,
// handler: () {
// Navigator.push(context,
// MaterialPageRoute(builder: (context) => navigationWidget));
// },
// ),
], ],
), ),
); );

@ -34,9 +34,11 @@ class _PharmacyAddressesState extends State<PharmacyAddressesPage> {
Navigator.push( Navigator.push(
ctx, ctx,
FadePage( FadePage(
page: AddAddressPage(address, (pickResult) { page: AddAddressPage(address, (pickResult) async {
model.addEditAddress(pickResult, address); model.addEditAddress(pickResult, address);
}))); await model.getAddressesList();
})));
} }
Widget build(BuildContext context) { Widget build(BuildContext context) {

@ -72,7 +72,10 @@ class PharmacyAddressService extends BaseService {
} }
Future addCustomerAddress(AddressInfo address) async { Future addCustomerAddress(AddressInfo address) async {
makeCustomerAddress(address, ADD_CUSTOMER_ADDRESS); await makeCustomerAddress(address, ADD_CUSTOMER_ADDRESS);
// if(!hasError) {
selectedAddressIndex = addresses.length +1;
// }
} }
Future editCustomerAddress(AddressInfo address) async { Future editCustomerAddress(AddressInfo address) async {

@ -1117,6 +1117,7 @@ class TranslationBase {
String get myPrescription => localizedValues['myPrescription'][locale.languageCode]; String get myPrescription => localizedValues['myPrescription'][locale.languageCode];
String get quantity => localizedValues['quantity'][locale.languageCode]; String get quantity => localizedValues['quantity'][locale.languageCode];
String get productQuantity => localizedValues['productQuantity'][locale.languageCode];
String get conditionsHMG => localizedValues['conditionsHMG'][locale.languageCode]; String get conditionsHMG => localizedValues['conditionsHMG'][locale.languageCode];
@ -1827,6 +1828,7 @@ class TranslationBase {
String get needPrescription => localizedValues['needPrescription'][locale.languageCode]; String get needPrescription => localizedValues['needPrescription'][locale.languageCode];
String get outOfStockMsg => localizedValues['outOfStockMsg'][locale.languageCode]; String get outOfStockMsg => localizedValues['outOfStockMsg'][locale.languageCode];
String get productOutOfStock => localizedValues['productOutOfStock'][locale.languageCode];
String get noArabicLetters => localizedValues['noArabicLetters'][locale.languageCode]; String get noArabicLetters => localizedValues['noArabicLetters'][locale.languageCode];

@ -248,10 +248,10 @@ class _SecondaryButtonState extends State<SecondaryButton>
style: TextStyle( style: TextStyle(
color: widget.textColor, color: widget.textColor,
fontSize: widget.small ? 12.0 : 14.0, fontSize: widget.small ? 12.0 : 14.0,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w700,
fontFamily: projectViewModel.isArabic fontFamily: projectViewModel.isArabic
? 'Cairo' ? 'Cairo'
: 'WorkSans' : 'Poppins'
), ),
), ),
) )

@ -272,7 +272,7 @@ class _TextsState extends State<Texts> {
style: _getFontStyle().copyWith( style: _getFontStyle().copyWith(
color: Theme.of(context).primaryColor, color: Theme.of(context).primaryColor,
fontWeight: FontWeight.w800, fontWeight: FontWeight.w800,
fontFamily: projectViewModel.isArabic ? 'Cairo' : 'WorkSans', fontFamily: projectViewModel.isArabic ? 'Poppins' : 'Poppins',
), ),
), ),
), ),

@ -60,11 +60,13 @@ class _AppTextState extends State<AppText> {
widget.data, widget.data,
textAlign: widget.textAlign, textAlign: widget.textAlign,
overflow: TextOverflow.clip, overflow: TextOverflow.clip,
style: TextStyle( style: TextStyle(
color: widget.color == null ? Theme.of(context).textTheme.bodyText1.color : widget.color, color: widget.color == null ? Theme.of(context).textTheme.bodyText1.color : widget.color,
fontWeight: widget.fontWeight, fontWeight: widget.fontWeight,
fontSize: widget.fontSize ?? (SizeConfig.textMultiplier * 2), fontSize: widget.fontSize ?? (SizeConfig.textMultiplier * 2),
height: widget.height, height: widget.height,
fontFamily: "Poppins",
letterSpacing: widget.letterSpacing, letterSpacing: widget.letterSpacing,
// fontFamily: widget.fontFamily == null // fontFamily: widget.fontFamily == null
// ? projectViewModel.isArabic // ? projectViewModel.isArabic

Loading…
Cancel
Save