v2.5.0 - Ability to add image placeholders on products + more
This commit is contained in:
parent
6106e18de9
commit
0968caf300
@ -1,3 +1,9 @@
|
|||||||
|
## [2.5.0] - 2020-12-23
|
||||||
|
|
||||||
|
* Ability to add image placeholders on products
|
||||||
|
* Dart code formatted
|
||||||
|
* Pubspec.yaml dependency updates
|
||||||
|
|
||||||
## [2.4.1] - 2020-12-20
|
## [2.4.1] - 2020-12-20
|
||||||
|
|
||||||
* Fix subtotal bug on order creation
|
* Fix subtotal bug on order creation
|
||||||
|
|||||||
@ -6,4 +6,5 @@
|
|||||||
<uses-permission android:name="android.permission.INTERNET" />
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
|
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
|
||||||
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
|
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
|
||||||
|
<uses-permission android:name="android.permission.VIBRATE"/>
|
||||||
</manifest>
|
</manifest>
|
||||||
|
|||||||
@ -8,6 +8,7 @@
|
|||||||
<uses-permission android:name="android.permission.INTERNET" />
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
|
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
|
||||||
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
|
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
|
||||||
|
<uses-permission android:name="android.permission.VIBRATE"/>
|
||||||
|
|
||||||
<application
|
<application
|
||||||
android:name="io.flutter.app.FlutterApplication"
|
android:name="io.flutter.app.FlutterApplication"
|
||||||
|
|||||||
@ -6,4 +6,5 @@
|
|||||||
<uses-permission android:name="android.permission.INTERNET" />
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
|
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
|
||||||
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
|
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
|
||||||
|
<uses-permission android:name="android.permission.VIBRATE"/>
|
||||||
</manifest>
|
</manifest>
|
||||||
|
|||||||
@ -50,7 +50,8 @@ Future<OrderWC> buildOrderWC({TaxRate taxRate, bool markPaid = true}) async {
|
|||||||
|
|
||||||
tmpLineItem.total =
|
tmpLineItem.total =
|
||||||
(cartItem.quantity > 1 ? cartItem.getCartTotal() : cartItem.subtotal);
|
(cartItem.quantity > 1 ? cartItem.getCartTotal() : cartItem.subtotal);
|
||||||
tmpLineItem.subtotal = (parseWcPrice(cartItem.subtotal) * cartItem.quantity).toString();
|
tmpLineItem.subtotal =
|
||||||
|
(parseWcPrice(cartItem.subtotal) * cartItem.quantity).toString();
|
||||||
|
|
||||||
lineItems.add(tmpLineItem);
|
lineItems.add(tmpLineItem);
|
||||||
});
|
});
|
||||||
|
|||||||
@ -16,7 +16,7 @@ import 'dart:ui';
|
|||||||
Developer Notes
|
Developer Notes
|
||||||
|
|
||||||
SUPPORT EMAIL - support@woosignal.com
|
SUPPORT EMAIL - support@woosignal.com
|
||||||
VERSION - 2.4.1
|
VERSION - 2.5.0
|
||||||
https://woosignal.com
|
https://woosignal.com
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -57,6 +57,8 @@ const List<Locale> app_locales_supported = [
|
|||||||
// then create a new lang json file using keys from en.json
|
// then create a new lang json file using keys from en.json
|
||||||
// e.g. lang/es.json
|
// e.g. lang/es.json
|
||||||
|
|
||||||
|
const app_product_placeholder_image = "https://woosignal.com/images/woocommerce-placeholder.png";
|
||||||
|
|
||||||
/*<! ------ PAYMENT GATEWAYS ------!>*/
|
/*<! ------ PAYMENT GATEWAYS ------!>*/
|
||||||
|
|
||||||
// Available: "Stripe", "CashOnDelivery", "RazorPay"
|
// Available: "Stripe", "CashOnDelivery", "RazorPay"
|
||||||
|
|||||||
@ -39,8 +39,10 @@ class _AboutPageState extends State<AboutPage> {
|
|||||||
icon: Icon(Icons.close),
|
icon: Icon(Icons.close),
|
||||||
onPressed: () => Navigator.pop(context),
|
onPressed: () => Navigator.pop(context),
|
||||||
),
|
),
|
||||||
title: Text(trans(context, "About"),
|
title: Text(
|
||||||
style: Theme.of(context).primaryTextTheme.headline6),
|
trans(context, "About"),
|
||||||
|
style: Theme.of(context).primaryTextTheme.headline6,
|
||||||
|
),
|
||||||
centerTitle: true,
|
centerTitle: true,
|
||||||
),
|
),
|
||||||
body: SafeArea(
|
body: SafeArea(
|
||||||
@ -84,9 +86,7 @@ class _AboutPageState extends State<AboutPage> {
|
|||||||
if (snapshot.hasError) return Text("");
|
if (snapshot.hasError) return Text("");
|
||||||
return Padding(
|
return Padding(
|
||||||
child: Text(
|
child: Text(
|
||||||
trans(context, "Version") +
|
"${trans(context, "Version")}: ${snapshot.data.version}",
|
||||||
": " +
|
|
||||||
snapshot.data.version,
|
|
||||||
style: Theme.of(context)
|
style: Theme.of(context)
|
||||||
.primaryTextTheme
|
.primaryTextTheme
|
||||||
.bodyText1),
|
.bodyText1),
|
||||||
|
|||||||
@ -76,9 +76,11 @@ class _CartPageState extends State<CartPage> {
|
|||||||
|
|
||||||
void _actionProceedToCheckout() async {
|
void _actionProceedToCheckout() async {
|
||||||
List<CartLineItem> cartLineItems = await Cart.getInstance.getCart();
|
List<CartLineItem> cartLineItems = await Cart.getInstance.getCart();
|
||||||
|
|
||||||
if (_isLoading == true) {
|
if (_isLoading == true) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cartLineItems.length <= 0) {
|
if (cartLineItems.length <= 0) {
|
||||||
showEdgeAlertWith(
|
showEdgeAlertWith(
|
||||||
context,
|
context,
|
||||||
@ -89,6 +91,7 @@ class _CartPageState extends State<CartPage> {
|
|||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!cartLineItems.every(
|
if (!cartLineItems.every(
|
||||||
(c) => c.stockStatus == 'instock' || c.stockStatus == 'onbackorder')) {
|
(c) => c.stockStatus == 'instock' || c.stockStatus == 'onbackorder')) {
|
||||||
showEdgeAlertWith(
|
showEdgeAlertWith(
|
||||||
@ -100,20 +103,24 @@ class _CartPageState extends State<CartPage> {
|
|||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
CheckoutSession.getInstance.initSession();
|
CheckoutSession.getInstance.initSession();
|
||||||
CustomerAddress sfCustomerAddress =
|
CustomerAddress sfCustomerAddress =
|
||||||
await CheckoutSession.getInstance.getBillingAddress();
|
await CheckoutSession.getInstance.getBillingAddress();
|
||||||
|
|
||||||
if (sfCustomerAddress != null) {
|
if (sfCustomerAddress != null) {
|
||||||
CheckoutSession.getInstance.billingDetails.billingAddress =
|
CheckoutSession.getInstance.billingDetails.billingAddress =
|
||||||
sfCustomerAddress;
|
sfCustomerAddress;
|
||||||
CheckoutSession.getInstance.billingDetails.shippingAddress =
|
CheckoutSession.getInstance.billingDetails.shippingAddress =
|
||||||
sfCustomerAddress;
|
sfCustomerAddress;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (use_wp_login == true && !(await authCheck())) {
|
if (use_wp_login == true && !(await authCheck())) {
|
||||||
UserAuth.instance.redirect = "/checkout";
|
UserAuth.instance.redirect = "/checkout";
|
||||||
Navigator.pushNamed(context, "/account-landing");
|
Navigator.pushNamed(context, "/account-landing");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Navigator.pushNamed(context, "/checkout");
|
Navigator.pushNamed(context, "/checkout");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -236,7 +243,9 @@ class _CartPageState extends State<CartPage> {
|
|||||||
),
|
),
|
||||||
)
|
)
|
||||||
: (_isLoading
|
: (_isLoading
|
||||||
? Expanded(child: showAppLoader())
|
? Expanded(
|
||||||
|
child: showAppLoader(),
|
||||||
|
)
|
||||||
: Expanded(
|
: Expanded(
|
||||||
child: ListView.builder(
|
child: ListView.builder(
|
||||||
padding: const EdgeInsets.all(8),
|
padding: const EdgeInsets.all(8),
|
||||||
|
|||||||
@ -15,7 +15,7 @@ import 'package:label_storemax/widgets/app_loader.dart';
|
|||||||
import 'package:label_storemax/widgets/cart_icon.dart';
|
import 'package:label_storemax/widgets/cart_icon.dart';
|
||||||
import 'package:pull_to_refresh/pull_to_refresh.dart';
|
import 'package:pull_to_refresh/pull_to_refresh.dart';
|
||||||
import 'package:woosignal/models/response/product_category.dart' as WS;
|
import 'package:woosignal/models/response/product_category.dart' as WS;
|
||||||
import 'package:woosignal/models/response/products.dart' as WS;
|
import 'package:woosignal/models/response/products.dart' as WSProduct;
|
||||||
import 'package:label_storemax/widgets/woosignal_ui.dart';
|
import 'package:label_storemax/widgets/woosignal_ui.dart';
|
||||||
|
|
||||||
class HomePage extends StatefulWidget {
|
class HomePage extends StatefulWidget {
|
||||||
@ -30,7 +30,7 @@ class _HomePageState extends State<HomePage> {
|
|||||||
|
|
||||||
RefreshController _refreshController =
|
RefreshController _refreshController =
|
||||||
RefreshController(initialRefresh: false);
|
RefreshController(initialRefresh: false);
|
||||||
List<WS.Product> _products = [];
|
List<WSProduct.Product> _products = [];
|
||||||
List<WS.ProductCategory> _categories = [];
|
List<WS.ProductCategory> _categories = [];
|
||||||
final GlobalKey _key = GlobalKey();
|
final GlobalKey _key = GlobalKey();
|
||||||
|
|
||||||
@ -72,8 +72,12 @@ class _HomePageState extends State<HomePage> {
|
|||||||
}
|
}
|
||||||
waitForNextRequest = true;
|
waitForNextRequest = true;
|
||||||
|
|
||||||
List<WS.Product> products = await appWooSignal((api) => api.getProducts(
|
List<WSProduct.Product> products = await appWooSignal((api) =>
|
||||||
perPage: 50, page: _page, status: "publish", stockStatus: "instock"));
|
api.getProducts(
|
||||||
|
perPage: 50,
|
||||||
|
page: _page,
|
||||||
|
status: "publish",
|
||||||
|
stockStatus: "instock"));
|
||||||
_page = _page + 1;
|
_page = _page + 1;
|
||||||
if (products.length == 0) {
|
if (products.length == 0) {
|
||||||
_shouldStopRequests = true;
|
_shouldStopRequests = true;
|
||||||
@ -217,7 +221,7 @@ class _HomePageState extends State<HomePage> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_showProduct(WS.Product product) {
|
_showProduct(WSProduct.Product product) {
|
||||||
Navigator.pushNamed(context, "/product-detail", arguments: product)
|
Navigator.pushNamed(context, "/product-detail", arguments: product)
|
||||||
.then((value) => _key.currentState.setState(() {}));
|
.then((value) => _key.currentState.setState(() {}));
|
||||||
}
|
}
|
||||||
|
|||||||
@ -11,19 +11,20 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/painting.dart';
|
import 'package:flutter/painting.dart';
|
||||||
import 'package:label_storemax/helpers/tools.dart';
|
import 'package:label_storemax/helpers/tools.dart';
|
||||||
|
import 'package:label_storemax/labelconfig.dart';
|
||||||
import 'package:label_storemax/models/cart.dart';
|
import 'package:label_storemax/models/cart.dart';
|
||||||
import 'package:label_storemax/models/cart_line_item.dart';
|
import 'package:label_storemax/models/cart_line_item.dart';
|
||||||
import 'package:label_storemax/widgets/app_loader.dart';
|
import 'package:label_storemax/widgets/app_loader.dart';
|
||||||
import 'package:label_storemax/widgets/buttons.dart';
|
import 'package:label_storemax/widgets/buttons.dart';
|
||||||
import 'package:label_storemax/widgets/cart_icon.dart';
|
import 'package:label_storemax/widgets/cart_icon.dart';
|
||||||
import 'package:woosignal/models/response/product_variation.dart' as WS;
|
import 'package:woosignal/models/response/product_variation.dart' as WS;
|
||||||
import 'package:woosignal/models/response/products.dart' as WS;
|
import 'package:woosignal/models/response/products.dart' as WSProduct;
|
||||||
import 'package:flutter_swiper/flutter_swiper.dart';
|
import 'package:flutter_swiper/flutter_swiper.dart';
|
||||||
import 'package:label_storemax/widgets/woosignal_ui.dart';
|
import 'package:label_storemax/widgets/woosignal_ui.dart';
|
||||||
import 'package:cached_network_image/cached_network_image.dart';
|
import 'package:cached_network_image/cached_network_image.dart';
|
||||||
|
|
||||||
class ProductDetailPage extends StatefulWidget {
|
class ProductDetailPage extends StatefulWidget {
|
||||||
final WS.Product product;
|
final WSProduct.Product product;
|
||||||
const ProductDetailPage({Key key, @required this.product}) : super(key: key);
|
const ProductDetailPage({Key key, @required this.product}) : super(key: key);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -34,7 +35,7 @@ class _ProductDetailState extends State<ProductDetailPage> {
|
|||||||
_ProductDetailState(this._product);
|
_ProductDetailState(this._product);
|
||||||
|
|
||||||
bool _isLoading;
|
bool _isLoading;
|
||||||
WS.Product _product;
|
WSProduct.Product _product;
|
||||||
int _quantityIndicator = 1;
|
int _quantityIndicator = 1;
|
||||||
List<WS.ProductVariation> _productVariations = [];
|
List<WS.ProductVariation> _productVariations = [];
|
||||||
|
|
||||||
@ -103,9 +104,8 @@ class _ProductDetailState extends State<ProductDetailPage> {
|
|||||||
void _modalBottomSheetOptionsForAttribute(int attributeIndex) {
|
void _modalBottomSheetOptionsForAttribute(int attributeIndex) {
|
||||||
wsModalBottom(
|
wsModalBottom(
|
||||||
context,
|
context,
|
||||||
title: trans(context, "Select a") +
|
title:
|
||||||
" " +
|
"${trans(context, "Select a")} ${_product.attributes[attributeIndex].name}",
|
||||||
_product.attributes[attributeIndex].name,
|
|
||||||
bodyWidget: ListView.separated(
|
bodyWidget: ListView.separated(
|
||||||
itemCount: _product.attributes[attributeIndex].options.length,
|
itemCount: _product.attributes[attributeIndex].options.length,
|
||||||
separatorBuilder: (BuildContext context, int index) => Divider(),
|
separatorBuilder: (BuildContext context, int index) => Divider(),
|
||||||
@ -164,9 +164,8 @@ class _ProductDetailState extends State<ProductDetailPage> {
|
|||||||
_tmpAttributeObj.containsKey(index))
|
_tmpAttributeObj.containsKey(index))
|
||||||
? Text(_tmpAttributeObj[index]["value"],
|
? Text(_tmpAttributeObj[index]["value"],
|
||||||
style: Theme.of(context).primaryTextTheme.bodyText1)
|
style: Theme.of(context).primaryTextTheme.bodyText1)
|
||||||
: Text(trans(context, "Select a") +
|
: Text(
|
||||||
" " +
|
"${trans(context, "Select a")} ${_product.attributes[index].name}"),
|
||||||
_product.attributes[index].name),
|
|
||||||
trailing: (_tmpAttributeObj.isNotEmpty &&
|
trailing: (_tmpAttributeObj.isNotEmpty &&
|
||||||
_tmpAttributeObj.containsKey(index))
|
_tmpAttributeObj.containsKey(index))
|
||||||
? Icon(Icons.check, color: Colors.blueAccent)
|
? Icon(Icons.check, color: Colors.blueAccent)
|
||||||
@ -212,7 +211,8 @@ class _ProductDetailState extends State<ProductDetailPage> {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (findProductVariation() == null) {
|
WS.ProductVariation productVariation = findProductVariation();
|
||||||
|
if (productVariation == null) {
|
||||||
showEdgeAlertWith(context,
|
showEdgeAlertWith(context,
|
||||||
title: trans(context, "Oops"),
|
title: trans(context, "Oops"),
|
||||||
desc: trans(context, "Product variation does not exist"),
|
desc: trans(context, "Product variation does not exist"),
|
||||||
@ -220,39 +220,39 @@ class _ProductDetailState extends State<ProductDetailPage> {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (findProductVariation() != null) {
|
if (productVariation.stockStatus != "instock") {
|
||||||
if (findProductVariation().stockStatus != "instock") {
|
showEdgeAlertWith(context,
|
||||||
showEdgeAlertWith(context,
|
title: trans(context, "Sorry"),
|
||||||
title: trans(context, "Sorry"),
|
desc: trans(context, "This item is not in stock"),
|
||||||
desc: trans(context, "This item is not in stock"),
|
style: EdgeAlertStyle.WARNING);
|
||||||
style: EdgeAlertStyle.WARNING);
|
return;
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
List<String> options = [];
|
List<String> options = [];
|
||||||
_tmpAttributeObj.forEach((k, v) {
|
_tmpAttributeObj.forEach((k, v) {
|
||||||
options.add(v["name"] + ": " + v["value"]);
|
options.add("${v["name"]}: ${v["value"]}");
|
||||||
});
|
});
|
||||||
|
|
||||||
CartLineItem cartLineItem = CartLineItem(
|
CartLineItem cartLineItem = CartLineItem(
|
||||||
name: _product.name,
|
name: _product.name,
|
||||||
productId: _product.id,
|
productId: _product.id,
|
||||||
variationId: findProductVariation().id,
|
variationId: productVariation.id,
|
||||||
quantity: 1,
|
quantity: 1,
|
||||||
taxStatus: findProductVariation().taxStatus,
|
taxStatus: productVariation.taxStatus,
|
||||||
shippingClassId:
|
shippingClassId: productVariation.shippingClassId.toString(),
|
||||||
findProductVariation().shippingClassId.toString(),
|
subtotal: productVariation.price,
|
||||||
subtotal: findProductVariation().price,
|
stockQuantity: productVariation.stockQuantity,
|
||||||
stockQuantity: findProductVariation().stockQuantity,
|
isManagedStock: productVariation.manageStock,
|
||||||
isManagedStock: findProductVariation().manageStock,
|
taxClass: productVariation.taxClass,
|
||||||
taxClass: findProductVariation().taxClass,
|
imageSrc: (productVariation.image != null
|
||||||
imageSrc: (findProductVariation().image != null
|
? productVariation.image.src
|
||||||
? findProductVariation().image.src
|
: _product.images.length == 0
|
||||||
: _product.images.first.src),
|
? app_product_placeholder_image
|
||||||
shippingIsTaxable: _product.shippingTaxable,
|
: _product.images.first.src),
|
||||||
variationOptions: options.join(", "),
|
shippingIsTaxable: _product.shippingTaxable,
|
||||||
total: findProductVariation().price);
|
variationOptions: options.join(", "),
|
||||||
|
total: productVariation.price,
|
||||||
|
);
|
||||||
|
|
||||||
_itemAddToCart(cartLineItem: cartLineItem);
|
_itemAddToCart(cartLineItem: cartLineItem);
|
||||||
Navigator.of(context).pop();
|
Navigator.of(context).pop();
|
||||||
@ -303,7 +303,9 @@ class _ProductDetailState extends State<ProductDetailPage> {
|
|||||||
child: new Swiper(
|
child: new Swiper(
|
||||||
itemBuilder: (BuildContext context, int index) {
|
itemBuilder: (BuildContext context, int index) {
|
||||||
return CachedNetworkImage(
|
return CachedNetworkImage(
|
||||||
imageUrl: _product.images[index].src,
|
imageUrl: _product.images.length == 0
|
||||||
|
? app_product_placeholder_image
|
||||||
|
: _product.images[index].src,
|
||||||
placeholder: (context, url) => Center(
|
placeholder: (context, url) => Center(
|
||||||
child: new CircularProgressIndicator(
|
child: new CircularProgressIndicator(
|
||||||
strokeWidth: 2,
|
strokeWidth: 2,
|
||||||
@ -315,7 +317,9 @@ class _ProductDetailState extends State<ProductDetailPage> {
|
|||||||
fit: BoxFit.contain,
|
fit: BoxFit.contain,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
itemCount: _product.images.length,
|
itemCount: _product.images.length == 0
|
||||||
|
? 1
|
||||||
|
: _product.images.length,
|
||||||
viewportFraction: 0.85,
|
viewportFraction: 0.85,
|
||||||
scale: 0.9,
|
scale: 0.9,
|
||||||
onTap: _productImageTapped,
|
onTap: _productImageTapped,
|
||||||
@ -542,7 +546,9 @@ class _ProductDetailState extends State<ProductDetailPage> {
|
|||||||
isManagedStock: _product.manageStock,
|
isManagedStock: _product.manageStock,
|
||||||
stockQuantity: _product.stockQuantity,
|
stockQuantity: _product.stockQuantity,
|
||||||
shippingIsTaxable: _product.shippingTaxable,
|
shippingIsTaxable: _product.shippingTaxable,
|
||||||
imageSrc: _product.images.first.src,
|
imageSrc: _product.images.length == 0
|
||||||
|
? app_product_placeholder_image
|
||||||
|
: _product.images.first.src,
|
||||||
total: _product.price,
|
total: _product.price,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -14,6 +14,7 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:label_storemax/helpers/tools.dart';
|
import 'package:label_storemax/helpers/tools.dart';
|
||||||
import 'package:flutter_swiper/flutter_swiper.dart';
|
import 'package:flutter_swiper/flutter_swiper.dart';
|
||||||
import 'package:cached_network_image/cached_network_image.dart';
|
import 'package:cached_network_image/cached_network_image.dart';
|
||||||
|
import 'package:label_storemax/labelconfig.dart';
|
||||||
|
|
||||||
class ProductImageViewerPage extends StatefulWidget {
|
class ProductImageViewerPage extends StatefulWidget {
|
||||||
final int initialIndex;
|
final int initialIndex;
|
||||||
@ -50,7 +51,9 @@ class _ProductImageViewerPageState extends State<ProductImageViewerPage> {
|
|||||||
index: _initialIndex,
|
index: _initialIndex,
|
||||||
itemBuilder: (BuildContext context, int index) {
|
itemBuilder: (BuildContext context, int index) {
|
||||||
return CachedNetworkImage(
|
return CachedNetworkImage(
|
||||||
imageUrl: _arrImageSrc[index],
|
imageUrl: _arrImageSrc.length == 0
|
||||||
|
? app_product_placeholder_image
|
||||||
|
: _arrImageSrc[index],
|
||||||
placeholder: (context, url) =>
|
placeholder: (context, url) =>
|
||||||
new CircularProgressIndicator(
|
new CircularProgressIndicator(
|
||||||
strokeWidth: 2,
|
strokeWidth: 2,
|
||||||
@ -60,7 +63,7 @@ class _ProductImageViewerPageState extends State<ProductImageViewerPage> {
|
|||||||
fit: BoxFit.contain,
|
fit: BoxFit.contain,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
itemCount: _arrImageSrc.length,
|
itemCount: _arrImageSrc.length == 0 ? 1 : _arrImageSrc.length,
|
||||||
viewportFraction: 0.9,
|
viewportFraction: 0.9,
|
||||||
scale: 0.95,
|
scale: 0.95,
|
||||||
),
|
),
|
||||||
|
|||||||
@ -229,7 +229,7 @@ Widget wsCardProductItem(BuildContext context,
|
|||||||
CachedNetworkImage(
|
CachedNetworkImage(
|
||||||
imageUrl: (product.images.length > 0
|
imageUrl: (product.images.length > 0
|
||||||
? product.images.first.src
|
? product.images.first.src
|
||||||
: ""),
|
: app_product_placeholder_image),
|
||||||
placeholder: (context, url) => Container(
|
placeholder: (context, url) => Container(
|
||||||
child: Center(
|
child: Center(
|
||||||
child: CircularProgressIndicator(),
|
child: CircularProgressIndicator(),
|
||||||
@ -541,7 +541,9 @@ Widget wsCardCartItem(BuildContext context,
|
|||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Flexible(
|
Flexible(
|
||||||
child: CachedNetworkImage(
|
child: CachedNetworkImage(
|
||||||
imageUrl: cartLineItem.imageSrc,
|
imageUrl: cartLineItem.imageSrc == ""
|
||||||
|
? app_product_placeholder_image
|
||||||
|
: cartLineItem.imageSrc,
|
||||||
width: 100,
|
width: 100,
|
||||||
height: 100,
|
height: 100,
|
||||||
fit: BoxFit.contain,
|
fit: BoxFit.contain,
|
||||||
|
|||||||
@ -49,7 +49,7 @@ packages:
|
|||||||
name: cached_network_image
|
name: cached_network_image
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.4.1"
|
version: "2.5.0"
|
||||||
characters:
|
characters:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -182,7 +182,7 @@ packages:
|
|||||||
name: flare_flutter
|
name: flare_flutter
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.8.3"
|
version: "2.0.6"
|
||||||
flutter:
|
flutter:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description: flutter
|
description: flutter
|
||||||
@ -208,7 +208,7 @@ packages:
|
|||||||
name: flutter_cache_manager
|
name: flutter_cache_manager
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.0"
|
version: "2.1.0"
|
||||||
flutter_launcher_icons:
|
flutter_launcher_icons:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
@ -248,7 +248,7 @@ packages:
|
|||||||
name: flutter_staggered_grid_view
|
name: flutter_staggered_grid_view
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.3.2"
|
version: "0.3.3"
|
||||||
flutter_swiper:
|
flutter_swiper:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
@ -267,7 +267,7 @@ packages:
|
|||||||
name: flutter_web_browser
|
name: flutter_web_browser
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.12.0"
|
version: "0.13.1"
|
||||||
flutter_web_plugins:
|
flutter_web_plugins:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description: flutter
|
description: flutter
|
||||||
@ -286,7 +286,7 @@ packages:
|
|||||||
name: html
|
name: html
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.14.0+3"
|
version: "0.14.0+4"
|
||||||
http:
|
http:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -307,7 +307,7 @@ packages:
|
|||||||
name: image
|
name: image
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.12"
|
version: "2.1.19"
|
||||||
intl:
|
intl:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
@ -349,14 +349,14 @@ packages:
|
|||||||
name: package_info
|
name: package_info
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.4.3"
|
version: "0.4.3+2"
|
||||||
page_transition:
|
page_transition:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: page_transition
|
name: page_transition
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.1.7+2"
|
version: "1.1.7+3"
|
||||||
path:
|
path:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -412,7 +412,7 @@ packages:
|
|||||||
name: petitparser
|
name: petitparser
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.4.0"
|
version: "3.1.0"
|
||||||
platform:
|
platform:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -447,14 +447,14 @@ packages:
|
|||||||
name: pull_to_refresh
|
name: pull_to_refresh
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.6.2"
|
version: "1.6.3"
|
||||||
razorpay_flutter:
|
razorpay_flutter:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: razorpay_flutter
|
name: razorpay_flutter
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.2.2"
|
version: "1.2.3"
|
||||||
rxdart:
|
rxdart:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -468,7 +468,7 @@ packages:
|
|||||||
name: shared_preferences
|
name: shared_preferences
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.5.12+2"
|
version: "0.5.12+4"
|
||||||
shared_preferences_linux:
|
shared_preferences_linux:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -543,7 +543,7 @@ packages:
|
|||||||
name: status_alert
|
name: status_alert
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.1.2"
|
version: "0.1.3"
|
||||||
stream_channel:
|
stream_channel:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -599,7 +599,7 @@ packages:
|
|||||||
name: url_launcher
|
name: url_launcher
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "5.7.7"
|
version: "5.7.10"
|
||||||
url_launcher_linux:
|
url_launcher_linux:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -662,14 +662,14 @@ packages:
|
|||||||
name: woosignal
|
name: woosignal
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.3.0"
|
version: "1.3.1"
|
||||||
woosignal_stripe:
|
woosignal_stripe:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: woosignal_stripe
|
name: woosignal_stripe
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.0.6"
|
version: "0.1.0"
|
||||||
wp_json_api:
|
wp_json_api:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
@ -690,7 +690,7 @@ packages:
|
|||||||
name: xml
|
name: xml
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.6.1"
|
version: "4.5.1"
|
||||||
yaml:
|
yaml:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -699,5 +699,5 @@ packages:
|
|||||||
source: hosted
|
source: hosted
|
||||||
version: "2.2.1"
|
version: "2.2.1"
|
||||||
sdks:
|
sdks:
|
||||||
dart: ">=2.10.0-110 <2.11.0"
|
dart: ">=2.10.0 <2.11.0"
|
||||||
flutter: ">=1.22.0 <2.0.0"
|
flutter: ">=1.22.0 <2.0.0"
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
# Official WooSignal App Template for WooCommerce
|
# Official WooSignal App Template for WooCommerce
|
||||||
|
|
||||||
# Label StoreMax
|
# Label StoreMax
|
||||||
# Version 2.4.1
|
# Version 2.5.0
|
||||||
# Homepage: https://woosignal.com
|
# Homepage: https://woosignal.com
|
||||||
# Author: Anthony Gordon <agordon@woosignal.com>
|
# Author: Anthony Gordon <agordon@woosignal.com>
|
||||||
# Documentation: https://woosignal.com/docs/app/ios/label-storemax
|
# Documentation: https://woosignal.com/docs/app/ios/label-storemax
|
||||||
@ -24,30 +24,30 @@ environment:
|
|||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
woosignal: ^1.3.1
|
woosignal: ^1.3.1
|
||||||
woosignal_stripe: ^0.0.6
|
woosignal_stripe: ^0.1.0
|
||||||
razorpay_flutter: ^1.2.2
|
razorpay_flutter: ^1.2.3
|
||||||
wp_json_api: ^2.0.0
|
wp_json_api: ^2.0.0
|
||||||
shared_preferences: ^0.5.12
|
shared_preferences: ^0.5.12+4
|
||||||
cached_network_image: ^2.4.1
|
cached_network_image: ^2.5.0
|
||||||
page_transition: ^1.1.7+2
|
page_transition: ^1.1.7+3
|
||||||
package_info: ^0.4.3
|
package_info: ^0.4.3+2
|
||||||
url_launcher: ^5.7.5
|
url_launcher: ^5.7.10
|
||||||
flutter_money_formatter: ^0.8.3
|
flutter_money_formatter: ^0.8.3
|
||||||
platform_alert_dialog: ^1.0.0+2
|
platform_alert_dialog: ^1.0.0+2
|
||||||
flutter_web_browser: ^0.12.0
|
flutter_web_browser: ^0.13.1
|
||||||
pull_to_refresh: ^1.6.2
|
pull_to_refresh: ^1.6.3
|
||||||
intl: ^0.16.1
|
intl: ^0.16.1
|
||||||
flutter_swiper: ^1.1.6
|
flutter_swiper: ^1.1.6
|
||||||
edge_alert: ^0.0.1
|
edge_alert: ^0.0.1
|
||||||
bubble_tab_indicator: ^0.1.4
|
bubble_tab_indicator: ^0.1.4
|
||||||
status_alert: ^0.1.2
|
status_alert: ^0.1.3
|
||||||
math_expressions: ^2.0.1
|
math_expressions: ^2.0.1
|
||||||
hexcolor: ^1.0.6
|
hexcolor: ^1.0.6
|
||||||
flutter_spinkit: ^4.1.2+1
|
flutter_spinkit: ^4.1.2+1
|
||||||
flutter_launcher_icons: ^0.8.1
|
flutter_launcher_icons: ^0.8.1
|
||||||
auto_size_text: ^2.1.0
|
auto_size_text: ^2.1.0
|
||||||
html: ^0.14.0+3
|
html: ^0.14.0+4
|
||||||
flutter_staggered_grid_view: ^0.3.2
|
flutter_staggered_grid_view: ^0.3.3
|
||||||
flutter:
|
flutter:
|
||||||
sdk: flutter
|
sdk: flutter
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user