v5.6.1 - updates
This commit is contained in:
parent
a8fc75f31a
commit
c98fd0246d
@ -1,3 +1,7 @@
|
|||||||
|
## [5.6.1] - 2022-01-05
|
||||||
|
|
||||||
|
* Fix bug with bottom navigation bar in Notic theme
|
||||||
|
|
||||||
## [5.6.0] - 2022-01-03
|
## [5.6.0] - 2022-01-03
|
||||||
|
|
||||||
* Fix bug with banner in Mello theme
|
* Fix bug with banner in Mello theme
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
# WooCommerce App: Label StoreMax
|
# WooCommerce App: Label StoreMax
|
||||||
|
|
||||||
### Label StoreMax - v5.6.0
|
### Label StoreMax - v5.6.1
|
||||||
|
|
||||||
|
|
||||||
[Official WooSignal WooCommerce App](https://woosignal.com)
|
[Official WooSignal WooCommerce App](https://woosignal.com)
|
||||||
@ -45,7 +45,7 @@ Full documentation this available [here](https://woosignal.com/docs/app/label-st
|
|||||||
- Change app name, logo, customize default language, currency + more
|
- Change app name, logo, customize default language, currency + more
|
||||||
- Light and dark mode
|
- Light and dark mode
|
||||||
- Stripe, Cash On Delivery, PayPal
|
- Stripe, Cash On Delivery, PayPal
|
||||||
- Localized for en, es, pt, it, hi, fr, zh
|
- Localized for en, es, pt, it, hi, fr, zh, tr, nl
|
||||||
- Orders show as normal in WooCommerce
|
- Orders show as normal in WooCommerce
|
||||||
|
|
||||||
## Security Vulnerabilities
|
## Security Vulnerabilities
|
||||||
|
|||||||
@ -39,7 +39,6 @@ Future<void> boot() async {
|
|||||||
/// if (settings.authorizationStatus == AuthorizationStatus.authorized) {
|
/// if (settings.authorizationStatus == AuthorizationStatus.authorized) {
|
||||||
/// String token = await messaging.getToken();
|
/// String token = await messaging.getToken();
|
||||||
/// WooSignal.instance.setFcmToken(token);
|
/// WooSignal.instance.setFcmToken(token);
|
||||||
/// AppHelper.instance.fcmToken = token;
|
|
||||||
/// }
|
/// }
|
||||||
|
|
||||||
AppHelper?.instance?.appConfig = WooSignalApp();
|
AppHelper?.instance?.appConfig = WooSignalApp();
|
||||||
|
|||||||
@ -12,6 +12,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_app/app/models/bottom_nav_item.dart';
|
||||||
import 'package:flutter_app/bootstrap/app_helper.dart';
|
import 'package:flutter_app/bootstrap/app_helper.dart';
|
||||||
import 'package:flutter_app/bootstrap/shared_pref/sp_auth.dart';
|
import 'package:flutter_app/bootstrap/shared_pref/sp_auth.dart';
|
||||||
import 'package:flutter_app/resources/pages/account_detail.dart';
|
import 'package:flutter_app/resources/pages/account_detail.dart';
|
||||||
@ -19,6 +20,7 @@ import 'package:flutter_app/resources/pages/account_landing.dart';
|
|||||||
import 'package:flutter_app/resources/pages/cart.dart';
|
import 'package:flutter_app/resources/pages/cart.dart';
|
||||||
import 'package:flutter_app/resources/pages/wishlist_page_widget.dart';
|
import 'package:flutter_app/resources/pages/wishlist_page_widget.dart';
|
||||||
import 'package:flutter_app/resources/pages/home_search.dart';
|
import 'package:flutter_app/resources/pages/home_search.dart';
|
||||||
|
import 'package:flutter_app/resources/widgets/app_loader_widget.dart';
|
||||||
import 'package:flutter_app/resources/widgets/notic_home_widget.dart';
|
import 'package:flutter_app/resources/widgets/notic_home_widget.dart';
|
||||||
import 'package:woosignal/models/response/woosignal_app.dart';
|
import 'package:woosignal/models/response/woosignal_app.dart';
|
||||||
|
|
||||||
@ -37,19 +39,29 @@ class _NoticThemeWidgetState extends State<NoticThemeWidget> {
|
|||||||
Widget activeWidget;
|
Widget activeWidget;
|
||||||
|
|
||||||
int _currentIndex = 0;
|
int _currentIndex = 0;
|
||||||
|
List<BottomNavItem> allNavWidgets;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
_changeMainWidget();
|
|
||||||
|
activeWidget = NoticHomeWidget(wooSignalApp: widget.wooSignalApp);
|
||||||
|
_loadTabs();
|
||||||
|
}
|
||||||
|
|
||||||
|
_loadTabs() async {
|
||||||
|
allNavWidgets = await bottomNavWidgets();
|
||||||
|
setState(() {});
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
body: activeWidget,
|
body: activeWidget,
|
||||||
bottomNavigationBar: BottomNavigationBar(
|
bottomNavigationBar: allNavWidgets == null
|
||||||
onTap: _onTabTapped,
|
? AppLoaderWidget() : BottomNavigationBar(
|
||||||
|
onTap: (currentIndex) =>
|
||||||
|
_changeMainWidget(currentIndex, allNavWidgets),
|
||||||
currentIndex: _currentIndex,
|
currentIndex: _currentIndex,
|
||||||
unselectedItemColor: Colors.black54,
|
unselectedItemColor: Colors.black54,
|
||||||
fixedColor: Colors.black87,
|
fixedColor: Colors.black87,
|
||||||
@ -59,66 +71,71 @@ class _NoticThemeWidgetState extends State<NoticThemeWidget> {
|
|||||||
),
|
),
|
||||||
showSelectedLabels: false,
|
showSelectedLabels: false,
|
||||||
showUnselectedLabels: false,
|
showUnselectedLabels: false,
|
||||||
items: [
|
items:
|
||||||
BottomNavigationBarItem(
|
allNavWidgets.map((e) => e.bottomNavigationBarItem).toList(),
|
||||||
icon: Icon(Icons.home),
|
|
||||||
label: 'Home',
|
|
||||||
),
|
|
||||||
BottomNavigationBarItem(
|
|
||||||
icon: Icon(Icons.search),
|
|
||||||
label: 'Search',
|
|
||||||
),
|
|
||||||
BottomNavigationBarItem(
|
|
||||||
icon: Icon(Icons.favorite_border),
|
|
||||||
label: 'Favourites',
|
|
||||||
),
|
|
||||||
BottomNavigationBarItem(
|
|
||||||
icon: Icon(Icons.shopping_cart),
|
|
||||||
label: 'Cart',
|
|
||||||
),
|
|
||||||
if (AppHelper.instance.appConfig.wpLoginEnabled == 1)
|
|
||||||
BottomNavigationBarItem(icon: Icon(Icons.person), label: 'Account')
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
_onTabTapped(int i) async {
|
Future<List<BottomNavItem>> bottomNavWidgets() async {
|
||||||
_currentIndex = i;
|
List<BottomNavItem> items = [];
|
||||||
await _changeMainWidget();
|
items.add(
|
||||||
setState(() {});
|
BottomNavItem(
|
||||||
|
id: 1,
|
||||||
|
bottomNavigationBarItem: BottomNavigationBarItem(
|
||||||
|
icon: Icon(Icons.home),
|
||||||
|
label: 'Home',
|
||||||
|
),
|
||||||
|
tabWidget: NoticHomeWidget(wooSignalApp: widget.wooSignalApp)),
|
||||||
|
);
|
||||||
|
|
||||||
|
items.add(
|
||||||
|
BottomNavItem(
|
||||||
|
id: 2,
|
||||||
|
bottomNavigationBarItem: BottomNavigationBarItem(
|
||||||
|
icon: Icon(Icons.search),
|
||||||
|
label: 'Search',
|
||||||
|
),
|
||||||
|
tabWidget: HomeSearchPage()),
|
||||||
|
);
|
||||||
|
|
||||||
|
if (AppHelper.instance.appConfig.wishlistEnabled == true) {
|
||||||
|
items.add(BottomNavItem(
|
||||||
|
id: 3,
|
||||||
|
bottomNavigationBarItem: BottomNavigationBarItem(
|
||||||
|
icon: Icon(Icons.favorite_border),
|
||||||
|
label: 'Wishlist',
|
||||||
|
),
|
||||||
|
tabWidget: WishListPageWidget(),
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
items.add(BottomNavItem(
|
||||||
|
id: 4,
|
||||||
|
bottomNavigationBarItem: BottomNavigationBarItem(
|
||||||
|
icon: Icon(Icons.shopping_cart), label: 'Cart'),
|
||||||
|
tabWidget: CartPage(),
|
||||||
|
));
|
||||||
|
|
||||||
|
if (AppHelper.instance.appConfig.wpLoginEnabled == 1) {
|
||||||
|
items.add(BottomNavItem(
|
||||||
|
id: 5,
|
||||||
|
bottomNavigationBarItem:
|
||||||
|
BottomNavigationBarItem(icon: Icon(Icons.person), label: 'Account'),
|
||||||
|
tabWidget: (await authCheck())
|
||||||
|
? AccountDetailPage(showLeadingBackButton: false)
|
||||||
|
: AccountLandingPage(
|
||||||
|
showBackButton: false,
|
||||||
|
),
|
||||||
|
));
|
||||||
|
}
|
||||||
|
return items;
|
||||||
}
|
}
|
||||||
|
|
||||||
_changeMainWidget() async {
|
_changeMainWidget(
|
||||||
if (_currentIndex == 2) {
|
int currentIndex, List<BottomNavItem> bottomNavWidgets) async {
|
||||||
activeWidget = WishListPageWidget();
|
_currentIndex = currentIndex;
|
||||||
return;
|
activeWidget = bottomNavWidgets[_currentIndex].tabWidget;
|
||||||
}
|
setState(() {});
|
||||||
switch (_currentIndex) {
|
|
||||||
case 0:
|
|
||||||
{
|
|
||||||
activeWidget = NoticHomeWidget(wooSignalApp: widget.wooSignalApp);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 1:
|
|
||||||
{
|
|
||||||
activeWidget = HomeSearchPage();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 2:
|
|
||||||
{
|
|
||||||
activeWidget = CartPage();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 3:
|
|
||||||
{
|
|
||||||
activeWidget = (await authCheck())
|
|
||||||
? AccountDetailPage(showLeadingBackButton: false)
|
|
||||||
: AccountLandingPage(
|
|
||||||
showBackButton: false,
|
|
||||||
);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
# Official WooSignal App Template for WooCommerce
|
# Official WooSignal App Template for WooCommerce
|
||||||
|
|
||||||
# Label StoreMax
|
# Label StoreMax
|
||||||
# Version: 5.6.0
|
# Version: 5.6.1
|
||||||
# Author: Anthony Gordon
|
# Author: Anthony Gordon
|
||||||
# Homepage: https://woosignal.com
|
# Homepage: https://woosignal.com
|
||||||
# Documentation: https://woosignal.com/docs/app/label-storemax
|
# Documentation: https://woosignal.com/docs/app/label-storemax
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user