v6.6.1 updates
This commit is contained in:
parent
54f7689e40
commit
adc32e730d
@ -1,3 +1,9 @@
|
||||
## [6.6.1] - 2023-05-28
|
||||
|
||||
* Refactor widgets + bug fixes
|
||||
* Refactor extensions.dart
|
||||
* Pubspec.yaml dependency updates.
|
||||
|
||||
## [6.6.0] - 2023-05-18
|
||||
|
||||
* Nylo v5.0.0 migration
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
|
||||
# WooCommerce App: Label StoreMax
|
||||
|
||||
### Label StoreMax - v6.6.0
|
||||
### Label StoreMax - v6.6.1
|
||||
|
||||
|
||||
[Official WooSignal WooCommerce App](https://woosignal.com)
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
|
||||
import 'package:flutter_app/app/controllers/woosignal_api_loader_controller.dart';
|
||||
import 'package:woosignal/models/response/product_category.dart';
|
||||
import 'package:woosignal/models/response/products.dart';
|
||||
import 'package:woosignal/models/response/product.dart';
|
||||
|
||||
class ProductCategorySearchLoaderController
|
||||
extends WooSignalApiLoaderController<Product> {
|
||||
|
||||
@ -14,7 +14,7 @@ import 'package:flutter_app/app/models/cart_line_item.dart';
|
||||
import 'package:flutter_app/bootstrap/enums/wishlist_action_enums.dart';
|
||||
import 'package:flutter_app/bootstrap/helpers.dart';
|
||||
import 'package:nylo_framework/nylo_framework.dart';
|
||||
import 'package:woosignal/models/response/products.dart';
|
||||
import 'package:woosignal/models/response/product.dart';
|
||||
import 'package:woosignal/models/response/product_variation.dart'
|
||||
as ws_product_variation;
|
||||
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
import 'package:flutter_app/app/controllers/woosignal_api_loader_controller.dart';
|
||||
import 'package:woosignal/models/response/products.dart';
|
||||
import 'package:woosignal/models/response/product.dart';
|
||||
|
||||
class ProductLoaderController extends WooSignalApiLoaderController<Product> {
|
||||
ProductLoaderController();
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
|
||||
import 'package:flutter_app/app/controllers/woosignal_api_loader_controller.dart';
|
||||
import 'package:woosignal/models/response/product_review.dart';
|
||||
import 'package:woosignal/models/response/products.dart';
|
||||
import 'package:woosignal/models/response/product.dart';
|
||||
|
||||
class ProductReviewsLoaderController
|
||||
extends WooSignalApiLoaderController<ProductReview> {
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
import 'package:flutter_app/app/controllers/woosignal_api_loader_controller.dart';
|
||||
import 'package:woosignal/models/response/products.dart';
|
||||
import 'package:woosignal/models/response/product.dart';
|
||||
|
||||
class ProductSearchLoaderController
|
||||
extends WooSignalApiLoaderController<Product> {
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
import 'package:flutter_app/bootstrap/helpers.dart';
|
||||
import 'package:nylo_framework/nylo_framework.dart';
|
||||
import 'package:woosignal/models/response/product_variation.dart';
|
||||
import 'package:woosignal/models/response/products.dart' as ws_product;
|
||||
import 'package:woosignal/models/response/product.dart' as ws_product;
|
||||
|
||||
class CartLineItem {
|
||||
String? name;
|
||||
|
||||
81
LabelStoreMax/lib/app/providers/payments/razorpay_pay.dart
Normal file
81
LabelStoreMax/lib/app/providers/payments/razorpay_pay.dart
Normal file
@ -0,0 +1,81 @@
|
||||
//
|
||||
// LabelCore
|
||||
// Label StoreMAX
|
||||
//
|
||||
// Created by Anthony Gordon.
|
||||
// 2023, WooSignal Ltd. All rights reserved.
|
||||
//
|
||||
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
//
|
||||
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:flutter_app/app/models/cart.dart';
|
||||
import 'package:flutter_app/bootstrap/data/order_wc.dart';
|
||||
import 'package:flutter_app/bootstrap/helpers.dart';
|
||||
import 'package:flutter_app/resources/pages/checkout_confirmation_page.dart';
|
||||
import 'package:nylo_framework/nylo_framework.dart';
|
||||
import 'package:razorpay_flutter/razorpay_flutter.dart';
|
||||
import 'package:woosignal/models/response/tax_rate.dart';
|
||||
import 'package:woosignal/models/payload/order_wc.dart';
|
||||
import 'package:woosignal/models/response/order.dart';
|
||||
|
||||
razorPay(context,
|
||||
{required CheckoutConfirmationPageState state, TaxRate? taxRate}) async {
|
||||
Razorpay razorpay = Razorpay();
|
||||
|
||||
razorpay.on(Razorpay.EVENT_PAYMENT_SUCCESS,
|
||||
(PaymentSuccessResponse response) async {
|
||||
OrderWC orderWC = await buildOrderWC(taxRate: taxRate);
|
||||
|
||||
Order? order = await appWooSignal((api) => api.createOrder(orderWC));
|
||||
|
||||
if (order != null) {
|
||||
Cart.getInstance.clear();
|
||||
Navigator.pushNamed(context, "/checkout-status", arguments: order);
|
||||
} else {
|
||||
showToastNotification(
|
||||
context,
|
||||
title: "Error".tr(),
|
||||
description: trans("Something went wrong, please contact our store"),
|
||||
);
|
||||
state.reloadState(showLoader: false);
|
||||
}
|
||||
});
|
||||
|
||||
razorpay.on(Razorpay.EVENT_PAYMENT_ERROR, (PaymentFailureResponse response) {
|
||||
showToastNotification(context,
|
||||
title: trans("Error"),
|
||||
description: response.message ?? "",
|
||||
style: ToastNotificationStyleType.WARNING);
|
||||
state.reloadState(showLoader: false);
|
||||
});
|
||||
|
||||
razorpay.on(Razorpay.EVENT_EXTERNAL_WALLET, _handleExternalWallet);
|
||||
|
||||
// CHECKOUT HELPER
|
||||
await checkout(taxRate, (total, billingDetails, cart) async {
|
||||
var options = {
|
||||
'key': getEnv('RAZORPAY_API_KEY'),
|
||||
'amount': (double.parse(total) * 100).toInt(),
|
||||
'name': getEnv('APP_NAME'),
|
||||
'description': await cart.cartShortDesc(),
|
||||
'prefill': {
|
||||
"name": [
|
||||
billingDetails!.billingAddress?.firstName,
|
||||
billingDetails.billingAddress?.lastName
|
||||
].where((t) => t != null || t != "").toList().join(" "),
|
||||
"method": "card",
|
||||
'email': billingDetails.billingAddress?.emailAddress ?? ""
|
||||
}
|
||||
};
|
||||
|
||||
state.reloadState(showLoader: true);
|
||||
|
||||
razorpay.open(options);
|
||||
});
|
||||
}
|
||||
|
||||
void _handleExternalWallet(ExternalWalletResponse response) {}
|
||||
@ -1,81 +1,9 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_app/bootstrap/helpers.dart';
|
||||
import 'package:flutter_app/resources/themes/styles/color_styles.dart';
|
||||
import 'package:nylo_framework/nylo_framework.dart';
|
||||
|
||||
extension NyText on Text {
|
||||
/// Set the Style to use [displayLarge].
|
||||
Text displayLarge(BuildContext context) {
|
||||
return setStyle(Theme.of(context).textTheme.displayLarge);
|
||||
}
|
||||
|
||||
/// Set the Style to use [displayMedium].
|
||||
Text displayMedium(BuildContext context) {
|
||||
return setStyle(Theme.of(context).textTheme.displayMedium);
|
||||
}
|
||||
|
||||
/// Set the Style to use [displaySmall].
|
||||
Text displaySmall(BuildContext context) {
|
||||
return setStyle(Theme.of(context).textTheme.displaySmall);
|
||||
}
|
||||
|
||||
/// Set the Style to use [headlineLarge].
|
||||
Text headingLarge(BuildContext context) {
|
||||
return setStyle(Theme.of(context).textTheme.headlineLarge);
|
||||
}
|
||||
|
||||
/// Set the Style to use [headlineMedium].
|
||||
Text headingMedium(BuildContext context) {
|
||||
return setStyle(Theme.of(context).textTheme.headlineMedium);
|
||||
}
|
||||
|
||||
/// Set the Style to use [headlineSmall].
|
||||
Text headingSmall(BuildContext context) {
|
||||
return setStyle(Theme.of(context).textTheme.headlineSmall);
|
||||
}
|
||||
|
||||
/// Set the Style to use [titleLarge].
|
||||
Text titleLarge(BuildContext context) {
|
||||
return setStyle(Theme.of(context).textTheme.titleLarge);
|
||||
}
|
||||
|
||||
/// Set the Style to use [titleMedium].
|
||||
Text titleMedium(BuildContext context) {
|
||||
return setStyle(Theme.of(context).textTheme.titleMedium);
|
||||
}
|
||||
|
||||
/// Set the Style to use [titleSmall].
|
||||
Text titleSmall(BuildContext context) {
|
||||
return setStyle(Theme.of(context).textTheme.titleSmall);
|
||||
}
|
||||
|
||||
/// Set the Style to use [bodyLarge].
|
||||
Text large(BuildContext context) {
|
||||
return setStyle(Theme.of(context).textTheme.bodyLarge);
|
||||
}
|
||||
|
||||
/// Set the Style to use [bodyMedium].
|
||||
Text medium(BuildContext context) {
|
||||
return setStyle(Theme.of(context).textTheme.bodyMedium);
|
||||
}
|
||||
|
||||
/// Set the Style to use [bodySmall].
|
||||
Text small(BuildContext context) {
|
||||
return setStyle(Theme.of(context).textTheme.bodySmall);
|
||||
}
|
||||
|
||||
/// Make the font bold.
|
||||
Text fontWeightBold() {
|
||||
return copyWith(style: TextStyle(fontWeight: FontWeight.bold));
|
||||
}
|
||||
|
||||
/// Make the font light.
|
||||
Text fontWeightLight() {
|
||||
return copyWith(style: TextStyle(fontWeight: FontWeight.w300));
|
||||
}
|
||||
|
||||
/// Change the [style].
|
||||
Text setStyle(TextStyle? style) => copyWith(style: style);
|
||||
|
||||
/// Sets the color from your [ColorStyles] or [Color].
|
||||
Text setColor(
|
||||
BuildContext context, Color Function(ColorStyles color) newColor,
|
||||
@ -84,59 +12,6 @@ extension NyText on Text {
|
||||
style: TextStyle(
|
||||
color: newColor(ThemeColor.get(context, themeId: themeId))));
|
||||
}
|
||||
|
||||
/// Aligns text to the left.
|
||||
Text alignLeft() {
|
||||
return copyWith(textAlign: TextAlign.left);
|
||||
}
|
||||
|
||||
/// Aligns text to the right.
|
||||
Text alignRight() {
|
||||
return copyWith(textAlign: TextAlign.right);
|
||||
}
|
||||
|
||||
/// Aligns text to the center.
|
||||
Text alignCenter() {
|
||||
return copyWith(textAlign: TextAlign.center);
|
||||
}
|
||||
|
||||
/// Aligns text to the center.
|
||||
Text setMaxLines(int maxLines) {
|
||||
return copyWith(maxLines: maxLines);
|
||||
}
|
||||
|
||||
/// Change the [fontFamily].
|
||||
Text setFontFamily(String fontFamily) =>
|
||||
copyWith(style: TextStyle(fontFamily: fontFamily));
|
||||
|
||||
/// Helper to apply changes.
|
||||
Text copyWith(
|
||||
{Key? key,
|
||||
StrutStyle? strutStyle,
|
||||
TextAlign? textAlign,
|
||||
TextDirection? textDirection = TextDirection.ltr,
|
||||
Locale? locale,
|
||||
bool? softWrap,
|
||||
TextOverflow? overflow,
|
||||
double? textScaleFactor,
|
||||
int? maxLines,
|
||||
String? semanticsLabel,
|
||||
TextWidthBasis? textWidthBasis,
|
||||
TextStyle? style}) {
|
||||
return Text(data ?? "",
|
||||
key: key ?? this.key,
|
||||
strutStyle: strutStyle ?? this.strutStyle,
|
||||
textAlign: textAlign ?? this.textAlign,
|
||||
textDirection: textDirection ?? this.textDirection,
|
||||
locale: locale ?? this.locale,
|
||||
softWrap: softWrap ?? this.softWrap,
|
||||
overflow: overflow ?? this.overflow,
|
||||
textScaleFactor: textScaleFactor ?? this.textScaleFactor,
|
||||
maxLines: maxLines ?? this.maxLines,
|
||||
semanticsLabel: semanticsLabel ?? this.semanticsLabel,
|
||||
textWidthBasis: textWidthBasis ?? this.textWidthBasis,
|
||||
style: style != null ? this.style?.merge(style) ?? style : this.style);
|
||||
}
|
||||
}
|
||||
|
||||
/// Check if the [Product] is new.
|
||||
|
||||
@ -38,7 +38,7 @@ import 'package:money_formatter/money_formatter.dart';
|
||||
import 'package:nylo_framework/nylo_framework.dart';
|
||||
import 'package:pull_to_refresh_flutter3/pull_to_refresh_flutter3.dart';
|
||||
import 'package:status_alert/status_alert.dart';
|
||||
import 'package:woosignal/models/response/products.dart';
|
||||
import 'package:woosignal/models/response/product.dart';
|
||||
import 'package:woosignal/models/response/tax_rate.dart';
|
||||
import 'package:woosignal/woosignal.dart';
|
||||
import 'package:wp_json_api/models/responses/wp_user_info_response.dart';
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import 'package:flutter_app/app/models/payment_type.dart';
|
||||
import 'package:flutter_app/app/providers/payments/cash_on_delivery.dart';
|
||||
import 'package:flutter_app/app/providers/payments/paypal_pay.dart';
|
||||
import 'package:flutter_app/app/providers/payments/razorpay_pay.dart';
|
||||
import 'package:flutter_app/app/providers/payments/stripe_pay.dart';
|
||||
import 'package:flutter_app/bootstrap/helpers.dart';
|
||||
import 'package:nylo_framework/nylo_framework.dart';
|
||||
@ -43,6 +44,14 @@ List<PaymentType> paymentTypeList = [
|
||||
pay: payPalPay,
|
||||
),
|
||||
|
||||
addPayment(
|
||||
id: 5,
|
||||
name: "RazorPay",
|
||||
description: trans("Debit or Credit Card"),
|
||||
assetImage: "razorpay.png",
|
||||
pay: razorPay,
|
||||
),
|
||||
|
||||
// e.g. add more here
|
||||
|
||||
// addPayment(
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
import 'package:nylo_framework/nylo_framework.dart';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
||||
@ -20,7 +20,7 @@ import 'package:flutter_app/resources/widgets/woosignal_ui.dart';
|
||||
import 'package:nylo_framework/nylo_framework.dart';
|
||||
import 'package:pull_to_refresh_flutter3/pull_to_refresh_flutter3.dart';
|
||||
import 'package:woosignal/models/response/product_category.dart';
|
||||
import 'package:woosignal/models/response/products.dart' as ws_product;
|
||||
import 'package:woosignal/models/response/product.dart' as ws_product;
|
||||
|
||||
class BrowseCategoryPage extends NyStatefulWidget {
|
||||
final BrowseCategoryController controller = BrowseCategoryController();
|
||||
|
||||
@ -16,7 +16,7 @@ import 'package:flutter_app/resources/widgets/app_loader_widget.dart';
|
||||
import 'package:flutter_app/resources/widgets/safearea_widget.dart';
|
||||
import 'package:nylo_framework/nylo_framework.dart';
|
||||
import 'package:pull_to_refresh_flutter3/pull_to_refresh_flutter3.dart';
|
||||
import 'package:woosignal/models/response/products.dart' as ws_product;
|
||||
import 'package:woosignal/models/response/product.dart' as ws_product;
|
||||
|
||||
class BrowseSearchPage extends NyStatefulWidget {
|
||||
final BrowseSearchController controller = BrowseSearchController();
|
||||
|
||||
@ -16,7 +16,6 @@ import 'package:flutter_app/app/models/customer_address.dart';
|
||||
import 'package:flutter_app/bootstrap/app_helper.dart';
|
||||
import 'package:flutter_app/bootstrap/helpers.dart';
|
||||
import 'package:flutter_app/bootstrap/shared_pref/sp_auth.dart';
|
||||
import 'package:flutter_app/resources/widgets/app_loader_widget.dart';
|
||||
import 'package:flutter_app/resources/widgets/buttons.dart';
|
||||
import 'package:flutter_app/resources/widgets/safearea_widget.dart';
|
||||
import 'package:flutter_app/resources/widgets/text_row_widget.dart';
|
||||
@ -30,26 +29,19 @@ class CartPage extends StatefulWidget {
|
||||
_CartPageState createState() => _CartPageState();
|
||||
}
|
||||
|
||||
class _CartPageState extends State<CartPage> {
|
||||
class _CartPageState extends NyState<CartPage> {
|
||||
_CartPageState();
|
||||
|
||||
bool _isLoading = true, _isCartEmpty = false;
|
||||
List<CartLineItem> _cartLines = [];
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_cartCheck();
|
||||
boot() async {
|
||||
await _cartCheck();
|
||||
CheckoutSession.getInstance.coupon = null;
|
||||
}
|
||||
|
||||
_cartCheck() async {
|
||||
List<CartLineItem> cart = await Cart.getInstance.getCart();
|
||||
if (cart.isEmpty) {
|
||||
setState(() {
|
||||
_isLoading = false;
|
||||
_isCartEmpty = true;
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
@ -59,25 +51,18 @@ class _CartPageState extends State<CartPage> {
|
||||
await (appWooSignal((api) => api.cartCheck(cartJSON)));
|
||||
if (cartRes.isEmpty) {
|
||||
Cart.getInstance.saveCartToPref(cartLineItems: []);
|
||||
setState(() {
|
||||
_isCartEmpty = true;
|
||||
_isLoading = false;
|
||||
});
|
||||
return;
|
||||
}
|
||||
_cartLines = cartRes.map((json) => CartLineItem.fromJson(json)).toList();
|
||||
if (_cartLines.isNotEmpty) {
|
||||
Cart.getInstance.saveCartToPref(cartLineItems: _cartLines);
|
||||
}
|
||||
setState(() {
|
||||
_isLoading = false;
|
||||
});
|
||||
}
|
||||
|
||||
void _actionProceedToCheckout() async {
|
||||
List<CartLineItem> cartLineItems = await Cart.getInstance.getCart();
|
||||
|
||||
if (_isLoading == true) {
|
||||
if (isLoading()) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -163,9 +148,6 @@ class _CartPageState extends State<CartPage> {
|
||||
style: ToastNotificationStyleType.WARNING,
|
||||
icon: Icons.remove_shopping_cart,
|
||||
);
|
||||
if (_cartLines.isEmpty) {
|
||||
_isCartEmpty = true;
|
||||
}
|
||||
setState(() {});
|
||||
}
|
||||
|
||||
@ -177,7 +159,6 @@ class _CartPageState extends State<CartPage> {
|
||||
description: trans("Cart cleared"),
|
||||
style: ToastNotificationStyleType.SUCCESS,
|
||||
icon: Icons.delete_outline);
|
||||
_isCartEmpty = true;
|
||||
setState(() {});
|
||||
}
|
||||
|
||||
@ -214,9 +195,8 @@ class _CartPageState extends State<CartPage> {
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
_isCartEmpty
|
||||
? Expanded(
|
||||
child: FractionallySizedBox(
|
||||
Expanded(
|
||||
child: afterLoad(child: () => _cartLines.isEmpty ? FractionallySizedBox(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
@ -237,14 +217,7 @@ class _CartPageState extends State<CartPage> {
|
||||
),
|
||||
heightFactor: 0.5,
|
||||
widthFactor: 1,
|
||||
),
|
||||
)
|
||||
: (_isLoading
|
||||
? Expanded(
|
||||
child: AppLoaderWidget(),
|
||||
)
|
||||
: Expanded(
|
||||
child: ListView.builder(
|
||||
) : ListView.builder(
|
||||
padding: const EdgeInsets.all(8),
|
||||
itemCount: _cartLines.length,
|
||||
itemBuilder: (BuildContext context, int index) {
|
||||
@ -260,9 +233,8 @@ class _CartPageState extends State<CartPage> {
|
||||
actionRemoveItem: () =>
|
||||
actionRemoveItem(index: index),
|
||||
);
|
||||
}),
|
||||
flex: 3,
|
||||
)),
|
||||
})),
|
||||
),
|
||||
Divider(
|
||||
color: Colors.black45,
|
||||
),
|
||||
@ -271,7 +243,7 @@ class _CartPageState extends State<CartPage> {
|
||||
child: (BuildContext context, data) => Padding(
|
||||
child: TextRowWidget(
|
||||
title: trans("Total"),
|
||||
text: (_isLoading ? "" : data),
|
||||
text: isLoading() ? '' : data,
|
||||
),
|
||||
padding: EdgeInsets.only(bottom: 15, top: 15),
|
||||
),
|
||||
|
||||
@ -16,7 +16,6 @@ import 'package:flutter_app/app/models/checkout_session.dart';
|
||||
import 'package:flutter_app/app/models/customer_country.dart';
|
||||
import 'package:flutter_app/app/models/payment_type.dart';
|
||||
import 'package:flutter_app/bootstrap/app_helper.dart';
|
||||
import 'package:flutter_app/bootstrap/extensions.dart';
|
||||
import 'package:flutter_app/bootstrap/helpers.dart';
|
||||
import 'package:flutter_app/resources/widgets/app_loader_widget.dart';
|
||||
import 'package:flutter_app/resources/widgets/buttons.dart';
|
||||
@ -186,7 +185,7 @@ class CheckoutConfirmationPageState extends NyState<CheckoutConfirmationPage> {
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(trans("Checkout")),
|
||||
Text(_wooSignalApp?.appName ?? getEnv('APP_NAME')).small(context),
|
||||
Text(_wooSignalApp?.appName ?? getEnv('APP_NAME')).bodySmall(context),
|
||||
],
|
||||
),
|
||||
centerTitle: false,
|
||||
|
||||
@ -77,7 +77,7 @@ class _CheckoutStatusState extends NyState<CheckoutStatusPage> {
|
||||
textAlign: TextAlign.left,
|
||||
),
|
||||
Text(
|
||||
"${trans("Order Ref")}. #${_order!.id.toString()}",
|
||||
"${trans("Order Ref")}. #${_order?.id.toString()}",
|
||||
style: Theme.of(context).textTheme.bodyLarge,
|
||||
textAlign: TextAlign.left,
|
||||
),
|
||||
@ -119,9 +119,9 @@ class _CheckoutStatusState extends NyState<CheckoutStatusPage> {
|
||||
),
|
||||
Expanded(
|
||||
child: ListView.builder(
|
||||
itemCount: _order!.lineItems == null
|
||||
itemCount: _order?.lineItems == null
|
||||
? 0
|
||||
: _order!.lineItems!.length,
|
||||
: _order?.lineItems?.length,
|
||||
itemBuilder: (BuildContext context, int index) {
|
||||
ws_order.LineItems lineItem = _order!.lineItems![index];
|
||||
return Container(
|
||||
|
||||
@ -14,7 +14,6 @@ import 'package:flutter_app/app/models/cart_line_item.dart';
|
||||
import 'package:flutter_app/bootstrap/app_helper.dart';
|
||||
import 'package:flutter_app/bootstrap/enums/wishlist_action_enums.dart';
|
||||
import 'package:flutter_app/bootstrap/helpers.dart';
|
||||
import 'package:flutter_app/resources/widgets/app_loader_widget.dart';
|
||||
import 'package:flutter_app/resources/widgets/buttons.dart';
|
||||
import 'package:flutter_app/resources/widgets/cart_icon_widget.dart';
|
||||
import 'package:flutter_app/resources/widgets/product_detail_body_widget.dart';
|
||||
@ -23,7 +22,7 @@ import 'package:flutter_app/resources/widgets/woosignal_ui.dart';
|
||||
import 'package:nylo_framework/nylo_framework.dart';
|
||||
import 'package:woosignal/models/response/product_variation.dart'
|
||||
as ws_product_variation;
|
||||
import 'package:woosignal/models/response/products.dart' as ws_product;
|
||||
import 'package:woosignal/models/response/product.dart' as ws_product;
|
||||
import 'package:woosignal/models/response/woosignal_app.dart';
|
||||
|
||||
class ProductDetailPage extends NyStatefulWidget {
|
||||
@ -36,7 +35,6 @@ class ProductDetailPage extends NyStatefulWidget {
|
||||
}
|
||||
|
||||
class _ProductDetailState extends NyState<ProductDetailPage> {
|
||||
bool _isLoading = true;
|
||||
ws_product.Product? _product;
|
||||
|
||||
List<ws_product_variation.ProductVariation> _productVariations = [];
|
||||
@ -45,14 +43,15 @@ class _ProductDetailState extends NyState<ProductDetailPage> {
|
||||
|
||||
@override
|
||||
init() async {
|
||||
super.init();
|
||||
}
|
||||
|
||||
@override
|
||||
boot() async {
|
||||
_product = widget.controller.data();
|
||||
if (_product!.type == "variable") {
|
||||
await _fetchProductVariations();
|
||||
return;
|
||||
}
|
||||
setState(() {
|
||||
_isLoading = false;
|
||||
});
|
||||
}
|
||||
|
||||
_fetchProductVariations() async {
|
||||
@ -76,9 +75,6 @@ class _ProductDetailState extends NyState<ProductDetailPage> {
|
||||
}
|
||||
}
|
||||
_productVariations = tmpVariations;
|
||||
setState(() {
|
||||
_isLoading = false;
|
||||
});
|
||||
}
|
||||
|
||||
_modalBottomSheetOptionsForAttribute(int attributeIndex) {
|
||||
@ -232,7 +228,7 @@ class _ProductDetailState extends NyState<ProductDetailPage> {
|
||||
actions: <Widget>[
|
||||
if (_wooSignalApp!.wishlistEnabled!)
|
||||
NyFutureBuilder(
|
||||
future: hasAddedWishlistProduct(_product!.id),
|
||||
future: hasAddedWishlistProduct(_product?.id),
|
||||
child: (context, dynamic isInFavourites) {
|
||||
return isInFavourites
|
||||
? IconButton(
|
||||
@ -256,9 +252,7 @@ class _ProductDetailState extends NyState<ProductDetailPage> {
|
||||
centerTitle: true,
|
||||
),
|
||||
body: SafeArea(
|
||||
child: _isLoading
|
||||
? AppLoaderWidget()
|
||||
: Column(
|
||||
child: afterLoad(child: () => Column(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
@ -281,7 +275,7 @@ class _ProductDetailState extends NyState<ProductDetailPage> {
|
||||
quantity: widget.controller.quantity,
|
||||
)
|
||||
],
|
||||
),
|
||||
))
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@ -20,7 +20,7 @@ import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart';
|
||||
import 'package:nylo_framework/nylo_framework.dart';
|
||||
import 'package:pull_to_refresh_flutter3/pull_to_refresh_flutter3.dart';
|
||||
import 'package:woosignal/models/response/product_review.dart';
|
||||
import 'package:woosignal/models/response/products.dart';
|
||||
import 'package:woosignal/models/response/product.dart';
|
||||
import '../../app/controllers/product_reviews_controller.dart';
|
||||
|
||||
class ProductReviewsPage extends NyStatefulWidget {
|
||||
|
||||
@ -10,25 +10,21 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_app/bootstrap/helpers.dart';
|
||||
import 'package:flutter_app/resources/widgets/app_loader_widget.dart';
|
||||
import 'package:flutter_app/resources/widgets/cached_image_widget.dart';
|
||||
import 'package:nylo_framework/nylo_framework.dart';
|
||||
import 'package:woosignal/models/response/products.dart';
|
||||
import 'package:woosignal/models/response/product.dart';
|
||||
|
||||
class WishListPageWidget extends StatefulWidget {
|
||||
@override
|
||||
_WishListPageWidgetState createState() => _WishListPageWidgetState();
|
||||
}
|
||||
|
||||
class _WishListPageWidgetState extends State<WishListPageWidget> {
|
||||
class _WishListPageWidgetState extends NyState<WishListPageWidget> {
|
||||
List<Product> _products = [];
|
||||
bool? isLoading;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
isLoading = true;
|
||||
loadProducts();
|
||||
boot() async {
|
||||
await loadProducts();
|
||||
}
|
||||
|
||||
loadProducts() async {
|
||||
@ -36,9 +32,6 @@ class _WishListPageWidgetState extends State<WishListPageWidget> {
|
||||
List<int> productIds =
|
||||
favouriteProducts.map((e) => e['id']).cast<int>().toList();
|
||||
if (productIds.isEmpty) {
|
||||
setState(() {
|
||||
isLoading = false;
|
||||
});
|
||||
return;
|
||||
}
|
||||
_products = await (appWooSignal((api) => api.getProducts(
|
||||
@ -47,9 +40,6 @@ class _WishListPageWidgetState extends State<WishListPageWidget> {
|
||||
status: "publish",
|
||||
stockStatus: "instock",
|
||||
)));
|
||||
setState(() {
|
||||
isLoading = false;
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
@ -60,9 +50,8 @@ class _WishListPageWidgetState extends State<WishListPageWidget> {
|
||||
title: Text(trans("Wishlist")),
|
||||
),
|
||||
body: SafeArea(
|
||||
child: isLoading!
|
||||
? AppLoaderWidget()
|
||||
: _products.isEmpty && isLoading == false
|
||||
child: afterLoad(
|
||||
child: () => _products.isEmpty
|
||||
? Center(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
@ -150,6 +139,7 @@ class _WishListPageWidgetState extends State<WishListPageWidget> {
|
||||
return Divider();
|
||||
},
|
||||
itemCount: _products.length)),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -20,7 +20,7 @@ import 'package:flutter_swiper_view/flutter_swiper_view.dart';
|
||||
import 'package:nylo_framework/nylo_framework.dart';
|
||||
import 'package:woosignal/models/response/product_category.dart';
|
||||
import 'package:woosignal/models/response/woosignal_app.dart';
|
||||
import 'package:woosignal/models/response/products.dart';
|
||||
import 'package:woosignal/models/response/product.dart';
|
||||
|
||||
class CompoHomeWidget extends StatefulWidget {
|
||||
CompoHomeWidget({Key? key, required this.wooSignalApp}) : super(key: key);
|
||||
|
||||
@ -11,7 +11,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_app/app/controllers/product_loader_controller.dart';
|
||||
import 'package:flutter_app/bootstrap/helpers.dart';
|
||||
import 'package:flutter_app/resources/widgets/app_loader_widget.dart';
|
||||
import 'package:flutter_app/resources/widgets/cart_icon_widget.dart';
|
||||
import 'package:flutter_app/resources/widgets/home_drawer_widget.dart';
|
||||
import 'package:flutter_app/resources/widgets/safearea_widget.dart';
|
||||
@ -20,7 +19,7 @@ import 'package:nylo_framework/nylo_framework.dart';
|
||||
import 'package:pull_to_refresh_flutter3/pull_to_refresh_flutter3.dart';
|
||||
import 'package:woosignal/models/response/woosignal_app.dart';
|
||||
import 'package:woosignal/models/response/product_category.dart' as ws_category;
|
||||
import 'package:woosignal/models/response/products.dart' as ws_product;
|
||||
import 'package:woosignal/models/response/product.dart' as ws_product;
|
||||
|
||||
class MelloThemeWidget extends StatefulWidget {
|
||||
MelloThemeWidget(
|
||||
@ -33,7 +32,7 @@ class MelloThemeWidget extends StatefulWidget {
|
||||
_MelloThemeWidgetState createState() => _MelloThemeWidgetState();
|
||||
}
|
||||
|
||||
class _MelloThemeWidgetState extends State<MelloThemeWidget> {
|
||||
class _MelloThemeWidgetState extends NyState<MelloThemeWidget> {
|
||||
final RefreshController _refreshController =
|
||||
RefreshController(initialRefresh: false);
|
||||
final ProductLoaderController _productLoaderController =
|
||||
@ -41,20 +40,21 @@ class _MelloThemeWidgetState extends State<MelloThemeWidget> {
|
||||
|
||||
List<ws_category.ProductCategory> _categories = [];
|
||||
|
||||
bool _shouldStopRequests = false, _isLoading = true;
|
||||
bool _shouldStopRequests = false;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_home();
|
||||
void init() async {
|
||||
super.init();
|
||||
}
|
||||
|
||||
@override
|
||||
boot() async {
|
||||
await _home();
|
||||
}
|
||||
|
||||
_home() async {
|
||||
await fetchProducts();
|
||||
await _fetchCategories();
|
||||
setState(() {
|
||||
_isLoading = false;
|
||||
});
|
||||
}
|
||||
|
||||
_fetchCategories() async {
|
||||
@ -110,9 +110,7 @@ class _MelloThemeWidgetState extends State<MelloThemeWidget> {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
child: _isLoading
|
||||
? AppLoaderWidget()
|
||||
: RefreshableScrollContainer(
|
||||
child: afterLoad(child: () => RefreshableScrollContainer(
|
||||
controller: _refreshController,
|
||||
onRefresh: _onRefresh,
|
||||
onLoading: _onLoading,
|
||||
@ -121,7 +119,7 @@ class _MelloThemeWidgetState extends State<MelloThemeWidget> {
|
||||
bannerHeight: MediaQuery.of(context).size.height / 3.5,
|
||||
bannerImages: bannerImages,
|
||||
modalBottomSheetMenu: _modalBottomSheetMenu,
|
||||
),
|
||||
)),
|
||||
flex: 1,
|
||||
),
|
||||
],
|
||||
|
||||
@ -12,7 +12,6 @@ import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_app/app/controllers/product_loader_controller.dart';
|
||||
import 'package:flutter_app/bootstrap/helpers.dart';
|
||||
import 'package:flutter_app/resources/widgets/app_loader_widget.dart';
|
||||
import 'package:flutter_app/resources/widgets/cached_image_widget.dart';
|
||||
import 'package:flutter_app/resources/widgets/home_drawer_widget.dart';
|
||||
import 'package:flutter_app/resources/widgets/no_results_for_products_widget.dart';
|
||||
@ -23,7 +22,7 @@ import 'package:nylo_framework/nylo_framework.dart';
|
||||
import 'package:pull_to_refresh_flutter3/pull_to_refresh_flutter3.dart';
|
||||
import 'package:woosignal/models/response/woosignal_app.dart';
|
||||
import 'package:woosignal/models/response/product_category.dart' as ws_category;
|
||||
import 'package:woosignal/models/response/products.dart' as ws_product;
|
||||
import 'package:woosignal/models/response/product.dart' as ws_product;
|
||||
|
||||
class NoticHomeWidget extends StatefulWidget {
|
||||
NoticHomeWidget({Key? key, required this.wooSignalApp}) : super(key: key);
|
||||
@ -34,7 +33,7 @@ class NoticHomeWidget extends StatefulWidget {
|
||||
_NoticHomeWidgetState createState() => _NoticHomeWidgetState();
|
||||
}
|
||||
|
||||
class _NoticHomeWidgetState extends State<NoticHomeWidget> {
|
||||
class _NoticHomeWidgetState extends NyState<NoticHomeWidget> {
|
||||
Widget? activeWidget;
|
||||
final RefreshController _refreshController =
|
||||
RefreshController(initialRefresh: false);
|
||||
@ -43,20 +42,16 @@ class _NoticHomeWidgetState extends State<NoticHomeWidget> {
|
||||
ProductLoaderController();
|
||||
List<ws_category.ProductCategory> _categories = [];
|
||||
|
||||
bool _shouldStopRequests = false, _isLoading = true;
|
||||
bool _shouldStopRequests = false;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_home();
|
||||
boot() async {
|
||||
await _home();
|
||||
}
|
||||
|
||||
_home() async {
|
||||
await fetchProducts();
|
||||
await _fetchCategories();
|
||||
setState(() {
|
||||
_isLoading = false;
|
||||
});
|
||||
}
|
||||
|
||||
_fetchCategories() async {
|
||||
@ -114,10 +109,8 @@ class _NoticHomeWidgetState extends State<NoticHomeWidget> {
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
(_isLoading
|
||||
? Expanded(child: AppLoaderWidget())
|
||||
: Expanded(
|
||||
child: ListView(
|
||||
Expanded(
|
||||
child: afterLoad(child: () => ListView(
|
||||
shrinkWrap: true,
|
||||
children: [
|
||||
Container(
|
||||
@ -138,7 +131,7 @@ class _NoticHomeWidgetState extends State<NoticHomeWidget> {
|
||||
height: MediaQuery.of(context).size.height / 2.5,
|
||||
),
|
||||
Container(
|
||||
height: 100,
|
||||
height: 75,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
@ -149,7 +142,7 @@ class _NoticHomeWidgetState extends State<NoticHomeWidget> {
|
||||
style: Theme.of(context)
|
||||
.textTheme
|
||||
.headlineMedium,
|
||||
maxLines: 2,
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
)
|
||||
@ -157,7 +150,7 @@ class _NoticHomeWidgetState extends State<NoticHomeWidget> {
|
||||
),
|
||||
),
|
||||
Container(
|
||||
height: 250,
|
||||
height: 380,
|
||||
child: SmartRefresher(
|
||||
enablePullDown: true,
|
||||
enablePullUp: true,
|
||||
@ -192,7 +185,6 @@ class _NoticHomeWidgetState extends State<NoticHomeWidget> {
|
||||
shrinkWrap: false,
|
||||
itemBuilder: (cxt, i) {
|
||||
return Container(
|
||||
// height: 200,
|
||||
width:
|
||||
MediaQuery.of(context).size.width /
|
||||
2.5,
|
||||
@ -208,8 +200,7 @@ class _NoticHomeWidgetState extends State<NoticHomeWidget> {
|
||||
)
|
||||
],
|
||||
),
|
||||
flex: 1,
|
||||
)),
|
||||
),flex: 1,),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
@ -15,7 +15,7 @@ import 'package:flutter_app/resources/widgets/product_detail_image_swiper_widget
|
||||
import 'package:flutter_app/resources/widgets/product_detail_related_products_widget.dart';
|
||||
import 'package:flutter_app/resources/widgets/product_detail_reviews_widget.dart';
|
||||
import 'package:flutter_app/resources/widgets/product_detail_upsell_widget.dart';
|
||||
import 'package:woosignal/models/response/products.dart';
|
||||
import 'package:woosignal/models/response/product.dart';
|
||||
import 'package:woosignal/models/response/woosignal_app.dart';
|
||||
|
||||
class ProductDetailBodyWidget extends StatelessWidget {
|
||||
|
||||
@ -13,7 +13,7 @@ import 'package:flutter_app/resources/widgets/woosignal_ui.dart';
|
||||
import 'package:flutter_widget_from_html_core/flutter_widget_from_html_core.dart';
|
||||
import 'package:nylo_framework/nylo_framework.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
import 'package:woosignal/models/response/products.dart';
|
||||
import 'package:woosignal/models/response/product.dart';
|
||||
|
||||
class ProductDetailDescriptionWidget extends StatelessWidget {
|
||||
const ProductDetailDescriptionWidget({Key? key, required this.product})
|
||||
|
||||
@ -13,7 +13,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_app/bootstrap/helpers.dart';
|
||||
import 'package:flutter_app/resources/widgets/buttons.dart';
|
||||
import 'package:nylo_framework/nylo_framework.dart';
|
||||
import 'package:woosignal/models/response/products.dart';
|
||||
import 'package:woosignal/models/response/product.dart';
|
||||
|
||||
class ProductDetailFooterActionsWidget extends StatelessWidget {
|
||||
const ProductDetailFooterActionsWidget(
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_app/bootstrap/helpers.dart';
|
||||
import 'package:woosignal/models/response/products.dart';
|
||||
import 'package:woosignal/models/response/product.dart';
|
||||
|
||||
class ProductDetailHeaderWidget extends StatelessWidget {
|
||||
const ProductDetailHeaderWidget({Key? key, required this.product})
|
||||
|
||||
@ -12,7 +12,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_app/resources/widgets/cached_image_widget.dart';
|
||||
import 'package:flutter_swiper_view/flutter_swiper_view.dart';
|
||||
import 'package:nylo_framework/nylo_framework.dart';
|
||||
import 'package:woosignal/models/response/products.dart';
|
||||
import 'package:woosignal/models/response/product.dart';
|
||||
|
||||
class ProductDetailImageSwiperWidget extends StatelessWidget {
|
||||
const ProductDetailImageSwiperWidget(
|
||||
|
||||
@ -12,7 +12,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_app/bootstrap/helpers.dart';
|
||||
import 'package:flutter_app/resources/widgets/woosignal_ui.dart';
|
||||
import 'package:nylo_framework/nylo_framework.dart';
|
||||
import 'package:woosignal/models/response/products.dart';
|
||||
import 'package:woosignal/models/response/product.dart';
|
||||
import 'package:woosignal/models/response/woosignal_app.dart';
|
||||
|
||||
class ProductDetailRelatedProductsWidget extends StatelessWidget {
|
||||
@ -55,7 +55,7 @@ class ProductDetailRelatedProductsWidget extends StatelessWidget {
|
||||
child: NyFutureBuilder<List<Product>>(
|
||||
future: fetchRelated(),
|
||||
child: (context, relatedProducts) {
|
||||
if (relatedProducts == null) {
|
||||
if (relatedProducts.isEmpty) {
|
||||
return SizedBox.shrink();
|
||||
}
|
||||
return ListView(
|
||||
@ -74,9 +74,7 @@ class ProductDetailRelatedProductsWidget extends StatelessWidget {
|
||||
);
|
||||
}
|
||||
|
||||
Future<List<Product>> fetchRelated() async {
|
||||
return await (appWooSignal(
|
||||
Future<List<Product>> fetchRelated() async => await (appWooSignal(
|
||||
(api) => api.getProducts(perPage: 100, include: product!.relatedIds),
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
@ -16,7 +16,7 @@ import 'package:flutter_app/resources/widgets/product_detail_review_tile_widget.
|
||||
import 'package:flutter_rating_bar/flutter_rating_bar.dart';
|
||||
import 'package:nylo_framework/nylo_framework.dart';
|
||||
import 'package:woosignal/models/response/product_review.dart';
|
||||
import 'package:woosignal/models/response/products.dart';
|
||||
import 'package:woosignal/models/response/product.dart';
|
||||
import 'package:woosignal/models/response/woosignal_app.dart';
|
||||
|
||||
class ProductDetailReviewsWidget extends StatefulWidget {
|
||||
|
||||
@ -13,7 +13,7 @@ import 'package:flutter_app/app/controllers/product_loader_controller.dart';
|
||||
import 'package:flutter_app/resources/widgets/app_loader_widget.dart';
|
||||
import 'package:flutter_app/resources/widgets/woosignal_ui.dart';
|
||||
import 'package:nylo_framework/nylo_framework.dart';
|
||||
import 'package:woosignal/models/response/products.dart';
|
||||
import 'package:woosignal/models/response/product.dart';
|
||||
import 'package:woosignal/models/response/woosignal_app.dart';
|
||||
|
||||
class ProductDetailUpsellWidget extends StatefulWidget {
|
||||
|
||||
@ -23,7 +23,7 @@ import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart';
|
||||
import 'package:flutter_swiper_view/flutter_swiper_view.dart';
|
||||
import 'package:nylo_framework/nylo_framework.dart';
|
||||
import 'package:pull_to_refresh_flutter3/pull_to_refresh_flutter3.dart';
|
||||
import 'package:woosignal/models/response/products.dart';
|
||||
import 'package:woosignal/models/response/product.dart';
|
||||
import 'package:woosignal/models/response/tax_rate.dart';
|
||||
|
||||
class RefreshableScrollContainer extends StatelessWidget {
|
||||
@ -108,7 +108,7 @@ class RefreshableScrollContainer extends StatelessWidget {
|
||||
.map((product) => StaggeredGridTile.fit(
|
||||
crossAxisCellCount: 1,
|
||||
child: Container(
|
||||
height: 200,
|
||||
height: 300,
|
||||
child: ProductItemContainer(
|
||||
product: product,
|
||||
onTap: onTap,
|
||||
@ -316,16 +316,16 @@ class ProductItemContainer extends StatelessWidget {
|
||||
return SizedBox.shrink();
|
||||
}
|
||||
|
||||
return LayoutBuilder(
|
||||
builder: (cxt, constraints) => InkWell(
|
||||
double height = 280;
|
||||
return InkWell(
|
||||
child: Container(
|
||||
margin: EdgeInsets.all(4),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
child: ListView(
|
||||
shrinkWrap: true,
|
||||
physics: NeverScrollableScrollPhysics(),
|
||||
children: <Widget>[
|
||||
Container(
|
||||
height: constraints.maxHeight / 1.6,
|
||||
height: 180,
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(3.0),
|
||||
child: Stack(
|
||||
@ -340,7 +340,7 @@ class ProductItemContainer extends StatelessWidget {
|
||||
? product!.images.first.src
|
||||
: getEnv("PRODUCT_PLACEHOLDER_IMAGE")),
|
||||
fit: BoxFit.contain,
|
||||
height: constraints.maxHeight / 1.6,
|
||||
height: height,
|
||||
width: double.infinity,
|
||||
),
|
||||
if (isProductNew(product))
|
||||
@ -354,7 +354,6 @@ class ProductItemContainer extends StatelessWidget {
|
||||
padding: EdgeInsets.all(3),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white70,
|
||||
// borderRadius: BorderRadius.circular(4),
|
||||
),
|
||||
child: RichText(
|
||||
textAlign: TextAlign.center,
|
||||
@ -394,8 +393,7 @@ class ProductItemContainer extends StatelessWidget {
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
),
|
||||
Flexible(
|
||||
child: Container(
|
||||
Container(
|
||||
padding: EdgeInsets.only(top: 4),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
@ -439,7 +437,6 @@ class ProductItemContainer extends StatelessWidget {
|
||||
].toList(),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
@ -447,7 +444,6 @@ class ProductItemContainer extends StatelessWidget {
|
||||
? onTap!(product)
|
||||
: Navigator.pushNamed(context, "/product-detail",
|
||||
arguments: product),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -189,10 +189,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: device_info_plus
|
||||
sha256: "9b1a0c32b2a503f8fe9f8764fac7b5fcd4f6bd35d8f49de5350bccf9e2a33b8a"
|
||||
sha256: "499c61743e13909c13374a8c209075385858c614b9c0f2487b5f9995eeaf7369"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "9.0.0"
|
||||
version: "9.0.1"
|
||||
device_info_plus_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -209,6 +209,14 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "5.1.2"
|
||||
eventify:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: eventify
|
||||
sha256: b829429f08586cc2001c628e7499e3e3c2493a1d895fd73b00ecb23351aa5a66
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.0.1"
|
||||
fake_async:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -407,10 +415,10 @@ packages:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: flutter_stripe
|
||||
sha256: "95f3c4b907493ff5cdd6b3cdeda03bb59c2bc409d0c0bfb44db948374f9c3595"
|
||||
sha256: "51c3ab5f7a705d864d719eb13882abbb3964c4f61983a13af6dc56607537b1e4"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "9.1.1"
|
||||
version: "9.2.0"
|
||||
flutter_styled_toast:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -453,6 +461,14 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.10.1"
|
||||
fluttertoast:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: fluttertoast
|
||||
sha256: "474f7d506230897a3cd28c965ec21c5328ae5605fc9c400cd330e9e9d6ac175c"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "8.2.2"
|
||||
freezed_annotation:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -481,10 +497,10 @@ packages:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: google_fonts
|
||||
sha256: "6b6f10f0ce3c42f6552d1c70d2c28d764cf22bb487f50f66cca31dcd5194f4d6"
|
||||
sha256: "2776c66b3e97c6cdd58d1bd3281548b074b64f1fd5c8f82391f7456e38849567"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "4.0.4"
|
||||
version: "4.0.5"
|
||||
html:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@ -494,13 +510,13 @@ packages:
|
||||
source: hosted
|
||||
version: "0.15.3"
|
||||
http:
|
||||
dependency: transitive
|
||||
dependency: "direct overridden"
|
||||
description:
|
||||
name: http
|
||||
sha256: "5895291c13fa8a3bd82e76d5627f69e0d85ca6a30dcac95c4ea19a5d555879c2"
|
||||
sha256: "4c3f04bfb64d3efd508d06b41b825542f08122d30bda4933fb95c069d22a4fa3"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.13.6"
|
||||
version: "1.0.0"
|
||||
http_parser:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -601,18 +617,18 @@ packages:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: nylo_framework
|
||||
sha256: "89cd06e70cd5e402e16174385bcbe24cb4954fc4ce2e6de30e774e5a19fd6b56"
|
||||
sha256: f9960dce938d1046166cc97f7ab613638d7e4f45e6e2a9b30e7d2b004d1d833d
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "5.0.0"
|
||||
version: "5.0.2"
|
||||
nylo_support:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: nylo_support
|
||||
sha256: "72228f50a1e37bc2e3c27dfe28ce72b7f72aa120829fb83b8c0d15f6f15c074b"
|
||||
sha256: "011a1614b2440ffcbac821e6624ca25355e304af6c8b5c298203bbbe547da00e"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "5.0.0"
|
||||
version: "5.1.2"
|
||||
octo_image:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -633,10 +649,10 @@ packages:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: package_info_plus
|
||||
sha256: d39e8fbff4c5aef4592737e25ad6ac500df006ce7a7a8e1f838ce1256e167542
|
||||
sha256: "28386bbe89ab5a7919a47cea99cdd1128e5a6e0bbd7eaafe20440ead84a15de3"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "4.0.0"
|
||||
version: "4.0.1"
|
||||
package_info_plus_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -773,6 +789,14 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.0.1"
|
||||
razorpay_flutter:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: razorpay_flutter
|
||||
sha256: d73a536032f6939f0a6706cff958904d471eb1acb3dc957c8cc4e1628f0fbc28
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.3.5"
|
||||
recase:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -918,10 +942,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: stripe_ios
|
||||
sha256: "1ce3922c9e9fd2e3ced6b9d349966fa19074794eec1c9bac3cec1bca53e98c85"
|
||||
sha256: e397609a5083b79706814342b40a2a58f1b97ecab2b9d6cae8d8e9f59646fc8c
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "9.1.0"
|
||||
version: "9.2.1"
|
||||
stripe_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -1118,10 +1142,10 @@ packages:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: woosignal
|
||||
sha256: "67d6962b9b38e0da217bc136ddfd76dea7f9e876905f8b196be49f0f6b83e922"
|
||||
sha256: "985313603ad26dbb48420ce1b9029ebec7b6681861bab094c5f89d1710281ac3"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.4.0"
|
||||
version: "3.5.0"
|
||||
wp_json_api:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
# Official WooSignal App Template for WooCommerce
|
||||
|
||||
# Label StoreMax
|
||||
# Version: 6.6.0
|
||||
# Version: 6.6.1
|
||||
# Author: Anthony Gordon
|
||||
# Homepage: https://woosignal.com
|
||||
# Documentation: https://woosignal.com/docs/app/label-storemax
|
||||
@ -26,14 +26,14 @@ environment:
|
||||
flutter: ">=3.0.0"
|
||||
|
||||
dependencies:
|
||||
google_fonts: ^4.0.3
|
||||
google_fonts: ^4.0.5
|
||||
analyzer: ^5.12.0
|
||||
intl: ^0.18.0
|
||||
nylo_framework: ^5.0.0
|
||||
woosignal: ^3.4.0
|
||||
nylo_framework: ^5.0.2
|
||||
woosignal: ^3.5.0
|
||||
wp_json_api: ^3.3.2
|
||||
cached_network_image: ^3.2.3
|
||||
package_info_plus: ^4.0.0
|
||||
package_info_plus: ^4.0.1
|
||||
money_formatter: ^0.0.3
|
||||
flutter_web_browser: ^0.17.1
|
||||
webview_flutter: ^3.0.4
|
||||
@ -61,7 +61,11 @@ dependencies:
|
||||
# Use with the CupertinoIcons class for iOS style icons.
|
||||
cupertino_icons: ^1.0.5
|
||||
collection: ^1.15.0
|
||||
flutter_stripe: ^9.1.1
|
||||
flutter_stripe: ^9.2.0
|
||||
razorpay_flutter: ^1.3.5
|
||||
|
||||
dependency_overrides:
|
||||
http: ^1.0.0
|
||||
|
||||
dev_dependencies:
|
||||
flutter_launcher_icons: ^0.13.1
|
||||
|
||||
Loading…
Reference in New Issue
Block a user