|
|
|
@ -57,7 +57,15 @@ class _FooterWidgetState extends State<FooterWidget> {
|
|
|
|
borderRadius: BorderRadius.all(
|
|
|
|
borderRadius: BorderRadius.all(
|
|
|
|
Radius.circular(0.0),
|
|
|
|
Radius.circular(0.0),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
border: Border.all(color: Color(0xFF707070), width: 0),
|
|
|
|
boxShadow: [
|
|
|
|
|
|
|
|
BoxShadow(
|
|
|
|
|
|
|
|
color: Color(0xFFCCCCCC),
|
|
|
|
|
|
|
|
spreadRadius: 0,
|
|
|
|
|
|
|
|
blurRadius: 4,
|
|
|
|
|
|
|
|
offset: Offset(2, 2), // changes position of shadow
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
// border: Border.all(color: Color(0xFF707070), width: 0),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
width: double.infinity,
|
|
|
|
width: double.infinity,
|
|
|
|
height: quantityUI,
|
|
|
|
height: quantityUI,
|
|
|
|
@ -219,12 +227,12 @@ class _FooterWidgetState extends State<FooterWidget> {
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Container(
|
|
|
|
Container(
|
|
|
|
width: MediaQuery.of(context).size.width * 0.35,
|
|
|
|
width: MediaQuery.of(context).size.width * 0.35,
|
|
|
|
|
|
|
|
margin: EdgeInsets.symmetric( vertical: 5.0),
|
|
|
|
|
|
|
|
|
|
|
|
child: SecondaryButton(
|
|
|
|
child: SecondaryButton(
|
|
|
|
label: TranslationBase.of(context).addToCart,
|
|
|
|
label: TranslationBase.of(context).addToCart,
|
|
|
|
disabled: (!widget.isAvailable && widget.quantity > 0) ||
|
|
|
|
disabled: isAddToCartDisable(),
|
|
|
|
widget.quantity > widget.quantityLimit ||
|
|
|
|
fontSize: 15,
|
|
|
|
widget.item.isRx,
|
|
|
|
|
|
|
|
fontSize: 16,
|
|
|
|
|
|
|
|
onTap: () async {
|
|
|
|
onTap: () async {
|
|
|
|
if (!authenticatedUserObject.isLogin) {
|
|
|
|
if (!authenticatedUserObject.isLogin) {
|
|
|
|
login();
|
|
|
|
login();
|
|
|
|
@ -235,8 +243,9 @@ class _FooterWidgetState extends State<FooterWidget> {
|
|
|
|
model: widget.model);
|
|
|
|
model: widget.model);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
borderColor: Color(0xFF4CAF50).withOpacity(0.7),
|
|
|
|
|
|
|
|
borderRadius: 6,
|
|
|
|
borderRadius: 6,
|
|
|
|
|
|
|
|
disableColor:Color(0xFFD6D6D6),
|
|
|
|
|
|
|
|
textColor: isAddToCartDisable()?Color(0xFFACACAC):Colors.white,
|
|
|
|
color: Color(0xFF535353),
|
|
|
|
color: Color(0xFF535353),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
@ -245,12 +254,13 @@ class _FooterWidgetState extends State<FooterWidget> {
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Container(
|
|
|
|
Container(
|
|
|
|
width: MediaQuery.of(context).size.width * 0.35,
|
|
|
|
width: MediaQuery.of(context).size.width * 0.35,
|
|
|
|
|
|
|
|
margin: EdgeInsets.symmetric( vertical: 5.0),
|
|
|
|
|
|
|
|
|
|
|
|
child: SecondaryButton(
|
|
|
|
child: SecondaryButton(
|
|
|
|
label: TranslationBase.of(context).buyNow,
|
|
|
|
label: TranslationBase.of(context).buyNow,
|
|
|
|
fontSize: 16,
|
|
|
|
fontSize: 15,
|
|
|
|
disabled: (!widget.isAvailable && widget.quantity > 0) ||
|
|
|
|
disabled: isBuyNowDisable(),
|
|
|
|
(widget.quantity > widget.quantityLimit) ||
|
|
|
|
|
|
|
|
widget.item.isRx,
|
|
|
|
|
|
|
|
onTap: () async {
|
|
|
|
onTap: () async {
|
|
|
|
if (!authenticatedUserObject.isLogin) {
|
|
|
|
if (!authenticatedUserObject.isLogin) {
|
|
|
|
login();
|
|
|
|
login();
|
|
|
|
@ -261,15 +271,11 @@ class _FooterWidgetState extends State<FooterWidget> {
|
|
|
|
model: widget.model);
|
|
|
|
model: widget.model);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
textColor: isBuyNowDisable()?Color(0xFFACACAC):Colors.white,
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
borderColor: Colors.grey[800].withOpacity(0.7),
|
|
|
|
|
|
|
|
borderRadius: 6,
|
|
|
|
borderRadius: 6,
|
|
|
|
disableColor: Colors.grey[700],
|
|
|
|
disableColor: Color(0xFFD6D6D6),
|
|
|
|
color: !widget.isAvailable && widget.quantity > 0 ||
|
|
|
|
color: Color(0xFF5AB145),
|
|
|
|
widget.quantity > widget.quantityLimit ||
|
|
|
|
|
|
|
|
widget.item.isRx
|
|
|
|
|
|
|
|
? Color(0xFF535353).withOpacity(0.7)
|
|
|
|
|
|
|
|
: Color(0xFF5AB145),
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
@ -280,6 +286,24 @@ class _FooterWidgetState extends State<FooterWidget> {
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool isBuyNowDisable(){
|
|
|
|
|
|
|
|
// return true;
|
|
|
|
|
|
|
|
return (!widget.isAvailable && widget.quantity > 0) ||
|
|
|
|
|
|
|
|
(widget.quantity > widget.quantityLimit) ||
|
|
|
|
|
|
|
|
widget.item.isRx;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool isAddToCartDisable(){
|
|
|
|
|
|
|
|
// return true;
|
|
|
|
|
|
|
|
return (!widget.isAvailable && widget.quantity > 0) ||
|
|
|
|
|
|
|
|
widget.quantity > widget.quantityLimit ||
|
|
|
|
|
|
|
|
widget.item.isRx;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void setUserValues(value) async {
|
|
|
|
void setUserValues(value) async {
|
|
|
|
if (value != null) sharedPref.setObject(IMEI_USER_DATA, value);
|
|
|
|
if (value != null) sharedPref.setObject(IMEI_USER_DATA, value);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|