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
|
||||
|
||||
* Fix bug with banner in Mello theme
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
|
||||
# WooCommerce App: Label StoreMax
|
||||
|
||||
### Label StoreMax - v5.6.0
|
||||
### Label StoreMax - v5.6.1
|
||||
|
||||
|
||||
[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
|
||||
- Light and dark mode
|
||||
- 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
|
||||
|
||||
## Security Vulnerabilities
|
||||
|
||||
@ -39,7 +39,6 @@ Future<void> boot() async {
|
||||
/// if (settings.authorizationStatus == AuthorizationStatus.authorized) {
|
||||
/// String token = await messaging.getToken();
|
||||
/// WooSignal.instance.setFcmToken(token);
|
||||
/// AppHelper.instance.fcmToken = token;
|
||||
/// }
|
||||
|
||||
AppHelper?.instance?.appConfig = WooSignalApp();
|
||||
|
||||
@ -12,6 +12,7 @@
|
||||
//
|
||||
|
||||
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/shared_pref/sp_auth.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/wishlist_page_widget.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:woosignal/models/response/woosignal_app.dart';
|
||||
|
||||
@ -37,19 +39,29 @@ class _NoticThemeWidgetState extends State<NoticThemeWidget> {
|
||||
Widget activeWidget;
|
||||
|
||||
int _currentIndex = 0;
|
||||
List<BottomNavItem> allNavWidgets;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_changeMainWidget();
|
||||
|
||||
activeWidget = NoticHomeWidget(wooSignalApp: widget.wooSignalApp);
|
||||
_loadTabs();
|
||||
}
|
||||
|
||||
_loadTabs() async {
|
||||
allNavWidgets = await bottomNavWidgets();
|
||||
setState(() {});
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
body: activeWidget,
|
||||
bottomNavigationBar: BottomNavigationBar(
|
||||
onTap: _onTabTapped,
|
||||
bottomNavigationBar: allNavWidgets == null
|
||||
? AppLoaderWidget() : BottomNavigationBar(
|
||||
onTap: (currentIndex) =>
|
||||
_changeMainWidget(currentIndex, allNavWidgets),
|
||||
currentIndex: _currentIndex,
|
||||
unselectedItemColor: Colors.black54,
|
||||
fixedColor: Colors.black87,
|
||||
@ -59,66 +71,71 @@ class _NoticThemeWidgetState extends State<NoticThemeWidget> {
|
||||
),
|
||||
showSelectedLabels: false,
|
||||
showUnselectedLabels: false,
|
||||
items: [
|
||||
BottomNavigationBarItem(
|
||||
items:
|
||||
allNavWidgets.map((e) => e.bottomNavigationBarItem).toList(),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Future<List<BottomNavItem>> bottomNavWidgets() async {
|
||||
List<BottomNavItem> items = [];
|
||||
items.add(
|
||||
BottomNavItem(
|
||||
id: 1,
|
||||
bottomNavigationBarItem: BottomNavigationBarItem(
|
||||
icon: Icon(Icons.home),
|
||||
label: 'Home',
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
tabWidget: NoticHomeWidget(wooSignalApp: widget.wooSignalApp)),
|
||||
);
|
||||
|
||||
items.add(
|
||||
BottomNavItem(
|
||||
id: 2,
|
||||
bottomNavigationBarItem: 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')
|
||||
],
|
||||
),
|
||||
tabWidget: HomeSearchPage()),
|
||||
);
|
||||
|
||||
if (AppHelper.instance.appConfig.wishlistEnabled == true) {
|
||||
items.add(BottomNavItem(
|
||||
id: 3,
|
||||
bottomNavigationBarItem: BottomNavigationBarItem(
|
||||
icon: Icon(Icons.favorite_border),
|
||||
label: 'Wishlist',
|
||||
),
|
||||
tabWidget: WishListPageWidget(),
|
||||
));
|
||||
}
|
||||
|
||||
_onTabTapped(int i) async {
|
||||
_currentIndex = i;
|
||||
await _changeMainWidget();
|
||||
setState(() {});
|
||||
}
|
||||
items.add(BottomNavItem(
|
||||
id: 4,
|
||||
bottomNavigationBarItem: BottomNavigationBarItem(
|
||||
icon: Icon(Icons.shopping_cart), label: 'Cart'),
|
||||
tabWidget: CartPage(),
|
||||
));
|
||||
|
||||
_changeMainWidget() async {
|
||||
if (_currentIndex == 2) {
|
||||
activeWidget = WishListPageWidget();
|
||||
return;
|
||||
}
|
||||
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())
|
||||
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,
|
||||
);
|
||||
break;
|
||||
),
|
||||
));
|
||||
}
|
||||
return items;
|
||||
}
|
||||
|
||||
_changeMainWidget(
|
||||
int currentIndex, List<BottomNavItem> bottomNavWidgets) async {
|
||||
_currentIndex = currentIndex;
|
||||
activeWidget = bottomNavWidgets[_currentIndex].tabWidget;
|
||||
setState(() {});
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
# Official WooSignal App Template for WooCommerce
|
||||
|
||||
# Label StoreMax
|
||||
# Version: 5.6.0
|
||||
# Version: 5.6.1
|
||||
# Author: Anthony Gordon
|
||||
# Homepage: https://woosignal.com
|
||||
# Documentation: https://woosignal.com/docs/app/label-storemax
|
||||
|
||||
Loading…
Reference in New Issue
Block a user