Skip to content

Commit

Permalink
v6.12.3
Browse files Browse the repository at this point in the history
  • Loading branch information
agordn52 committed Dec 10, 2023
1 parent f83e1fe commit ba493f6
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 83 deletions.
1 change: 1 addition & 0 deletions LabelStoreMax/.env
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ APP_NAME="MyApp"
APP_ENV="local"
APP_DEBUG="true"
APP_URL="https://mywoocommercestore.com"
API_BASE_URL="https://mywoocommercestore.com"

ASSET_PATH_PUBLIC="public/assets/"
ASSET_PATH_IMAGES="public/assets/images"
Expand Down
5 changes: 5 additions & 0 deletions LabelStoreMax/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## [6.12.3] - 2023-12-09

* Migrate code to Nylo v5.15.0
* Pubspec.yaml dependency updates

## [6.12.2] - 2023-12-02

* Pubspec.yaml dependency updates
Expand Down
14 changes: 7 additions & 7 deletions LabelStoreMax/lib/app/providers/app_provider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,14 @@ class AppProvider implements NyProvider {
assetsDirectory: assetsDirectory,
valuesAsMap: valuesAsMap);

nylo.appThemes = appThemes;
nylo.appLoader = loader;
nylo.appLogo = logo;
nylo.addControllers(controllers);

nylo.addModelDecoders(modelDecoders);
nylo.addLoader(loader);
nylo.addLogo(logo);
nylo.addThemes(appThemes);
nylo.addToastNotification(getToastNotificationWidget);
nylo.addValidationRules(validationRules);
nylo.toastNotification = getToastNotificationWidget;
nylo.addModelDecoders(modelDecoders);
nylo.addControllers(controllers);
nylo.addApiDecoders(apiDecoders);

return nylo;
}
Expand Down
4 changes: 1 addition & 3 deletions LabelStoreMax/lib/bootstrap/app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,7 @@ class AppBuild extends StatelessWidget {

@override
Widget build(BuildContext context) {
Nylo nylo = Backpack.instance.read('nylo');
List<AppTheme> appThemes =
nylo.appThemes.map((appTheme) => appTheme.toAppTheme()).toList();
List<AppTheme> appThemes = Nylo.getAppThemes();
return LocalizedApp(
child: ThemeProvider(
themes: appThemes,
Expand Down
53 changes: 3 additions & 50 deletions LabelStoreMax/lib/bootstrap/helpers.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ import 'package:flutter_app/bootstrap/enums/symbol_position_enums.dart';
import 'package:flutter_app/bootstrap/extensions.dart';
import 'package:flutter_app/bootstrap/shared_pref/shared_key.dart';
import 'package:flutter_app/config/currency.dart';
import 'package:flutter_app/config/decoders.dart';
import 'package:flutter_app/config/events.dart';
import 'package:flutter_app/config/payment_gateways.dart';
import 'package:flutter_app/resources/widgets/no_results_for_products_widget.dart';
import 'package:flutter_app/resources/widgets/woosignal_ui.dart';
Expand Down Expand Up @@ -54,27 +52,10 @@ Future appWooSignal(Function(WooSignal api) api) async {

/// helper to find correct color from the [context].
class ThemeColor {
static ColorStyles get(BuildContext context, {String? themeId}) {
Nylo nylo = Backpack.instance.read('nylo');
List<BaseThemeConfig<ColorStyles>> appThemes =
nylo.appThemes as List<BaseThemeConfig<ColorStyles>>;

if (themeId == null) {
BaseThemeConfig<ColorStyles> themeFound = appThemes.firstWhere(
(theme) =>
theme.id ==
getEnv(Theme.of(context).brightness == Brightness.light
? 'LIGHT_THEME_ID'
: 'DARK_THEME_ID'),
orElse: () => appThemes.first);
return themeFound.colors;
}
static ColorStyles get(BuildContext context, {String? themeId}) =>
nyColorStyle<ColorStyles>(context, themeId: themeId);

BaseThemeConfig<ColorStyles> baseThemeConfig = appThemes.firstWhere(
(theme) => theme.id == themeId,
orElse: () => appThemes.first);
return baseThemeConfig.colors;
}
static Color fromHex(String hexColor) => nyHexColor(hexColor);
}

/// helper to set colors on TextStyle
Expand Down Expand Up @@ -649,34 +630,6 @@ Future<BillingDetails> billingDetailsFromWpUserInfoResponse(
return billingDetails;
}

/// API helper
api<T>(dynamic Function(T request) request,
{BuildContext? context,
Map<String, dynamic> headers = const {},
String? bearerToken,
String? baseUrl,
int? page,
String? queryNamePage,
String? queryNamePerPage,
int? perPage,
List<Type> events = const []}) async =>
await nyApi<T>(
request: request,
apiDecoders: apiDecoders,
context: context,
headers: headers,
bearerToken: bearerToken,
baseUrl: baseUrl,
events: events,
page: page,
perPage: perPage,
queryParamPage: queryNamePage ?? "page",
queryParamPerPage: queryNamePerPage
);

/// Event helper
event<T>({Map? data}) async => nyEvent<T>(params: data, events: events);

/// Check if the [Product] is new.
bool isProductNew(Product? product) {
if (product?.dateCreatedGMT == null) false;
Expand Down
36 changes: 18 additions & 18 deletions LabelStoreMax/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ packages:
dependency: transitive
description:
name: _flutterfire_internals
sha256: eb0ac20f704799b986049fbb3c1c16421eca319a1b872378d669513e12452ba5
sha256: f5628cd9c92ed11083f425fd1f8f1bc60ecdda458c81d73b143aeda036c35fe7
url: "https://pub.dev"
source: hosted
version: "1.3.14"
version: "1.3.16"
analyzer:
dependency: "direct main"
description:
Expand Down Expand Up @@ -261,10 +261,10 @@ packages:
dependency: "direct main"
description:
name: firebase_core
sha256: d301561d614487688d797717bef013a264c517d1d09e4c5c1325c3a64c835efb
sha256: "96607c0e829a581c2a483c658f04e8b159964c3bae2730f73297070bc85d40bb"
url: "https://pub.dev"
source: hosted
version: "2.24.0"
version: "2.24.2"
firebase_core_platform_interface:
dependency: transitive
description:
Expand All @@ -277,34 +277,34 @@ packages:
dependency: transitive
description:
name: firebase_core_web
sha256: "10159d9ee42c79f4548971d92f3f0fcd5791f6738cda3583a4e3b2c8b244c018"
sha256: d585bdf3c656c3f7821ba1bd44da5f13365d22fcecaf5eb75c4295246aaa83c0
url: "https://pub.dev"
source: hosted
version: "2.9.0"
version: "2.10.0"
firebase_messaging:
dependency: "direct main"
description:
name: firebase_messaging
sha256: "260064e1b512a9e1970b5964d645eba888208ca3de42459c38e484c8ecdc37a9"
sha256: b9b94c7d932d83d36efcf7eb21caf50486a8f330c6f681bb68e7b979d036491e
url: "https://pub.dev"
source: hosted
version: "14.7.6"
version: "14.7.8"
firebase_messaging_platform_interface:
dependency: transitive
description:
name: firebase_messaging_platform_interface
sha256: "81fb8c983356dd75ee660f276c918380325df7a1ab1e981ede911809e9ddff30"
sha256: "200f27b70a6330d1ac3f0fbf5328412ef3b215cd9dbb7dcea1701d1fd705d37a"
url: "https://pub.dev"
source: hosted
version: "4.5.15"
version: "4.5.17"
firebase_messaging_web:
dependency: transitive
description:
name: firebase_messaging_web
sha256: "1c5d9b6cf929ab471300143059d1641a26b73c9c24adb5266e241aea23c090aa"
sha256: "1c254306714d4d76aea612d81775e8f18c712219f096a7e6abfa234de9fd4bd2"
url: "https://pub.dev"
source: hosted
version: "3.5.15"
version: "3.5.17"
flare_flutter:
dependency: transitive
description:
Expand Down Expand Up @@ -561,10 +561,10 @@ packages:
dependency: "direct dev"
description:
name: lints
sha256: "0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452"
sha256: cbf8d4b858bb0134ef3ef87841abdf8d63bfc255c266b7bf6b39daa1085c4290
url: "https://pub.dev"
source: hosted
version: "2.1.1"
version: "3.0.0"
logging:
dependency: transitive
description:
Expand Down Expand Up @@ -617,18 +617,18 @@ packages:
dependency: "direct main"
description:
name: nylo_framework
sha256: dca371fb9362db81eeb40a040d7ddb0c00dc08720cd4b3ea4bc646ec48a2325f
sha256: "2dac32e24ee95eb045c846c0524ee6fde7f86a6c2daa0d44af0c4efe731b54af"
url: "https://pub.dev"
source: hosted
version: "5.13.0"
version: "5.15.0"
nylo_support:
dependency: transitive
description:
name: nylo_support
sha256: "4b1209d56b5ddf0188f840c59f6b989259e4d352d35ca5743410350aa6a59473"
sha256: f27dd076c93d036a2cd298428f3c240c3a8f466a0feb1bffc6134b5ea7d9232b
url: "https://pub.dev"
source: hosted
version: "5.20.0"
version: "5.22.0"
octo_image:
dependency: transitive
description:
Expand Down
10 changes: 5 additions & 5 deletions LabelStoreMax/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Official WooSignal App Template for WooCommerce

# Label StoreMax
# Version: 6.12.2
# Version: 6.12.3
# Author: Anthony Gordon
# Homepage: https://woosignal.com
# Documentation: https://woosignal.com/docs/app/label-storemax
Expand Down Expand Up @@ -29,7 +29,7 @@ dependencies:
google_fonts: ^4.0.5
analyzer: ^5.12.0
intl: ^0.18.0
nylo_framework: ^5.13.0
nylo_framework: ^5.15.0
woosignal: ^3.8.1
wp_json_api: ^3.3.3
cached_network_image: ^3.3.0
Expand All @@ -50,8 +50,8 @@ dependencies:
flutter_rating_bar: ^4.0.1
flutter_staggered_grid_view: ^0.7.0
flutter_swiper_view: ^1.1.8
firebase_messaging: ^14.7.6
firebase_core: ^2.24.0
firebase_messaging: ^14.7.8
firebase_core: ^2.24.2
flutter:
sdk: flutter
flutter_localizations:
Expand All @@ -70,7 +70,7 @@ dependency_overrides:

dev_dependencies:
flutter_launcher_icons: ^0.13.1
lints: ^2.1.1
lints: ^3.0.0
flutter_test:
sdk: flutter

Expand Down

0 comments on commit ba493f6

Please sign in to comment.