commit
0665d0b6af
@ -1,3 +1,9 @@
|
||||
## [5.5.1] - 2021-12-18
|
||||
|
||||
* Fix bug if store connection fails
|
||||
* Minify default_shipping.json
|
||||
* Pubspec.yaml dependency updates
|
||||
|
||||
## [5.5.0] - 2021-12-17
|
||||
|
||||
* Change font from WooSignal dashboard
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
|
||||
# WooCommerce App: Label StoreMax
|
||||
|
||||
### Label StoreMax - v5.5.0
|
||||
### Label StoreMax - v5.5.1
|
||||
|
||||
|
||||
[Official WooSignal WooCommerce App](https://woosignal.com)
|
||||
|
||||
@ -13,7 +13,6 @@ import 'package:woosignal/models/response/woosignal_app.dart';
|
||||
class AppHelper {
|
||||
AppHelper._privateConstructor();
|
||||
|
||||
String themeType;
|
||||
static final AppHelper instance = AppHelper._privateConstructor();
|
||||
|
||||
WooSignalApp appConfig;
|
||||
|
||||
@ -43,6 +43,27 @@ Future<void> boot() async {
|
||||
/// AppHelper.instance.fcmToken = token;
|
||||
/// }
|
||||
|
||||
AppHelper?.instance?.appConfig = WooSignalApp();
|
||||
AppHelper.instance.appConfig.themeFont = "Poppins";
|
||||
AppHelper.instance.appConfig.themeColors = {
|
||||
'light': {
|
||||
'background': '0xFFFFFFFF',
|
||||
'primary_text': '0xFF000000',
|
||||
'button_background': '0xFF529cda',
|
||||
'button_text': '0xFFFFFFFF',
|
||||
'app_bar_background': '0xFFFFFFFF',
|
||||
'app_bar_text': '0xFF3a3d40',
|
||||
},
|
||||
'dark': {
|
||||
'background': '0xFF212121',
|
||||
'primary_text': '0xFFE1E1E1',
|
||||
'button_background': '0xFFFFFFFF',
|
||||
'button_text': '0xFF232c33',
|
||||
'app_bar_background': '0xFF2C2C2C',
|
||||
'app_bar_text': '0xFFFFFFFF',
|
||||
}
|
||||
};
|
||||
|
||||
// WooSignal Setup
|
||||
WooSignalApp wooSignalApp = await appWooSignal((api) => api.getApp());
|
||||
Locale locale = Locale('en');
|
||||
|
||||
@ -9,7 +9,7 @@ void main() async {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
Nylo nylo = await Nylo.init(router: appRouter(), setup: boot);
|
||||
|
||||
String initialRoute = AppHelper.instance.appConfig != null ? '/home' : '/no-connection';
|
||||
String initialRoute = AppHelper.instance.appConfig.appStatus != null ? '/home' : '/no-connection';
|
||||
|
||||
runApp(
|
||||
AppBuild(
|
||||
|
||||
@ -52,6 +52,9 @@ class _BrowseCategoryPageState extends NyState<BrowseCategoryPage> {
|
||||
}
|
||||
|
||||
_fetchMoreProducts() async {
|
||||
if (waitForNextRequest || _shouldStopRequests) {
|
||||
return;
|
||||
}
|
||||
waitForNextRequest = true;
|
||||
List<WS.Product> products = await appWooSignal(
|
||||
(api) => api.getProducts(
|
||||
@ -61,14 +64,18 @@ class _BrowseCategoryPageState extends NyState<BrowseCategoryPage> {
|
||||
status: "publish",
|
||||
stockStatus: "instock"),
|
||||
);
|
||||
_products.addAll(products);
|
||||
|
||||
if (products.length == 0) {
|
||||
_shouldStopRequests = true;
|
||||
setState(() {});
|
||||
return;
|
||||
} else {
|
||||
_products.addAll(products);
|
||||
}
|
||||
|
||||
waitForNextRequest = false;
|
||||
_page = _page + 1;
|
||||
|
||||
waitForNextRequest = false;
|
||||
if (products.length == 0) {
|
||||
_shouldStopRequests = true;
|
||||
}
|
||||
setState(() {
|
||||
_isLoading = false;
|
||||
});
|
||||
|
||||
@ -46,7 +46,11 @@ class _BrowseSearchState extends NyState<BrowseSearchPage> {
|
||||
}
|
||||
|
||||
_fetchProductsForSearch() async {
|
||||
if (waitForNextRequest || _shouldStopRequests) {
|
||||
return;
|
||||
}
|
||||
waitForNextRequest = true;
|
||||
|
||||
List<WS.Product> products = await appWooSignal(
|
||||
(api) => api.getProducts(
|
||||
perPage: 100,
|
||||
@ -56,14 +60,19 @@ class _BrowseSearchState extends NyState<BrowseSearchPage> {
|
||||
stockStatus: "instock",
|
||||
),
|
||||
);
|
||||
_products.addAll(products);
|
||||
|
||||
if (products.length == 0) {
|
||||
_shouldStopRequests = true;
|
||||
setState(() {
|
||||
_isLoading = false;
|
||||
});
|
||||
return;
|
||||
} else {
|
||||
_products.addAll(products);
|
||||
}
|
||||
waitForNextRequest = false;
|
||||
_page = _page + 1;
|
||||
|
||||
waitForNextRequest = false;
|
||||
if (products.length == 0) {
|
||||
_shouldStopRequests = true;
|
||||
}
|
||||
setState(() {
|
||||
_isLoading = false;
|
||||
});
|
||||
|
||||
@ -31,7 +31,7 @@ class _HomePageState extends State<HomePage> {
|
||||
Widget build(BuildContext context) {
|
||||
Widget theme =
|
||||
MelloThemeWidget(globalKey: _key, wooSignalApp: _wooSignalApp);
|
||||
if (AppHelper.instance.themeType == "notic") {
|
||||
if (AppHelper.instance.appConfig.theme == "notic") {
|
||||
theme = NoticThemeWidget(globalKey: _key, wooSignalApp: _wooSignalApp);
|
||||
}
|
||||
return theme;
|
||||
|
||||
@ -37,7 +37,7 @@ class _HomeSearchPageState extends State<HomeSearchPage> {
|
||||
Navigator.pushNamed(context, "/product-search",
|
||||
arguments: _txtSearchController.text)
|
||||
.then((search) {
|
||||
if (AppHelper.instance.themeType != "notic") {
|
||||
if (AppHelper.instance.appConfig.theme != "notic") {
|
||||
Navigator.pop(context);
|
||||
}
|
||||
});
|
||||
|
||||
@ -73,7 +73,6 @@ class _NoConnectionPageState extends State<NoConnectionPage> {
|
||||
}
|
||||
|
||||
AppHelper.instance.appConfig = wooSignalApp;
|
||||
AppHelper.instance.themeType = wooSignalApp.theme;
|
||||
Navigator.pushNamed(context, "/home");
|
||||
}
|
||||
}
|
||||
|
||||
@ -54,10 +54,7 @@ class _MelloThemeWidgetState extends State<MelloThemeWidget> {
|
||||
}
|
||||
|
||||
_fetchMoreProducts() async {
|
||||
if (_shouldStopRequests) {
|
||||
return;
|
||||
}
|
||||
if (waitForNextRequest) {
|
||||
if (waitForNextRequest || _shouldStopRequests) {
|
||||
return;
|
||||
}
|
||||
waitForNextRequest = true;
|
||||
@ -67,14 +64,17 @@ class _MelloThemeWidgetState extends State<MelloThemeWidget> {
|
||||
perPage: 50,
|
||||
page: _page,
|
||||
status: "publish",
|
||||
stockStatus: "instock"));
|
||||
_page = _page + 1;
|
||||
stockStatus: "instock"),
|
||||
);
|
||||
if (products.length == 0) {
|
||||
_shouldStopRequests = true;
|
||||
setState(() {});
|
||||
return;
|
||||
}
|
||||
_page = _page + 1;
|
||||
waitForNextRequest = false;
|
||||
setState(() {
|
||||
_products.addAll(products.toList());
|
||||
_products.addAll(products);
|
||||
});
|
||||
}
|
||||
|
||||
@ -125,21 +125,19 @@ class _MelloThemeWidgetState extends State<MelloThemeWidget> {
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
(_isLoading
|
||||
? Expanded(child: AppLoaderWidget())
|
||||
: Expanded(
|
||||
child: RefreshableScrollContainer(
|
||||
controller: _refreshController,
|
||||
onRefresh: _onRefresh,
|
||||
onLoading: _onLoading,
|
||||
products: _products,
|
||||
onTap: _showProduct,
|
||||
bannerHeight: MediaQuery.of(context).size.height / 3.5,
|
||||
bannerImages: bannerImages,
|
||||
modalBottomSheetMenu: _modalBottomSheetMenu,
|
||||
),
|
||||
flex: 1,
|
||||
)),
|
||||
Expanded(
|
||||
child: _isLoading ? AppLoaderWidget() : RefreshableScrollContainer(
|
||||
controller: _refreshController,
|
||||
onRefresh: _onRefresh,
|
||||
onLoading: _onLoading,
|
||||
products: _products,
|
||||
onTap: _showProduct,
|
||||
bannerHeight: MediaQuery.of(context).size.height / 3.5,
|
||||
bannerImages: bannerImages,
|
||||
modalBottomSheetMenu: _modalBottomSheetMenu,
|
||||
),
|
||||
flex: 1,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
@ -57,10 +57,7 @@ class _NoticHomeWidgetState extends State<NoticHomeWidget> {
|
||||
}
|
||||
|
||||
_fetchMoreProducts() async {
|
||||
if (_shouldStopRequests) {
|
||||
return;
|
||||
}
|
||||
if (waitForNextRequest) {
|
||||
if (waitForNextRequest || _shouldStopRequests) {
|
||||
return;
|
||||
}
|
||||
waitForNextRequest = true;
|
||||
@ -70,15 +67,19 @@ class _NoticHomeWidgetState extends State<NoticHomeWidget> {
|
||||
perPage: 50,
|
||||
page: _page,
|
||||
status: "publish",
|
||||
stockStatus: "instock"));
|
||||
_page = _page + 1;
|
||||
stockStatus: "instock"),
|
||||
);
|
||||
|
||||
if (products.length == 0) {
|
||||
_shouldStopRequests = true;
|
||||
setState(() {});
|
||||
return;
|
||||
} else {
|
||||
_products.addAll(products);
|
||||
}
|
||||
_page = _page + 1;
|
||||
waitForNextRequest = false;
|
||||
setState(() {
|
||||
_products.addAll(products.toList());
|
||||
});
|
||||
setState(() {});
|
||||
}
|
||||
|
||||
_modalBottomSheetMenu() {
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -907,7 +907,7 @@ packages:
|
||||
name: woosignal
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "3.0.0"
|
||||
version: "3.0.1"
|
||||
wp_json_api:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
# Official WooSignal App Template for WooCommerce
|
||||
|
||||
# Label StoreMax
|
||||
# Version: 5.5.0
|
||||
# Version: 5.5.1
|
||||
# Author: Anthony Gordon
|
||||
# Homepage: https://woosignal.com
|
||||
# Documentation: https://woosignal.com/docs/app/label-storemax
|
||||
@ -30,7 +30,7 @@ dependencies:
|
||||
intl: ^0.17.0
|
||||
page_transition: ^2.0.4
|
||||
nylo_framework: ^2.1.3
|
||||
woosignal: ^3.0.0
|
||||
woosignal: ^3.0.1
|
||||
flutter_stripe: ^2.0.2
|
||||
wp_json_api: ^3.1.3
|
||||
cached_network_image: ^3.2.0
|
||||
|
||||
Loading…
Reference in New Issue
Block a user