Skip to content

Commit ba493f6

Browse files
committed
v6.12.3
1 parent f83e1fe commit ba493f6

File tree

7 files changed

+40
-83
lines changed

7 files changed

+40
-83
lines changed

LabelStoreMax/.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ APP_NAME="MyApp"
44
APP_ENV="local"
55
APP_DEBUG="true"
66
APP_URL="https://mywoocommercestore.com"
7+
API_BASE_URL="https://mywoocommercestore.com"
78

89
ASSET_PATH_PUBLIC="public/assets/"
910
ASSET_PATH_IMAGES="public/assets/images"

LabelStoreMax/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## [6.12.3] - 2023-12-09
2+
3+
* Migrate code to Nylo v5.15.0
4+
* Pubspec.yaml dependency updates
5+
16
## [6.12.2] - 2023-12-02
27

38
* Pubspec.yaml dependency updates

LabelStoreMax/lib/app/providers/app_provider.dart

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -87,14 +87,14 @@ class AppProvider implements NyProvider {
8787
assetsDirectory: assetsDirectory,
8888
valuesAsMap: valuesAsMap);
8989

90-
nylo.appThemes = appThemes;
91-
nylo.appLoader = loader;
92-
nylo.appLogo = logo;
93-
nylo.addControllers(controllers);
94-
95-
nylo.addModelDecoders(modelDecoders);
90+
nylo.addLoader(loader);
91+
nylo.addLogo(logo);
92+
nylo.addThemes(appThemes);
93+
nylo.addToastNotification(getToastNotificationWidget);
9694
nylo.addValidationRules(validationRules);
97-
nylo.toastNotification = getToastNotificationWidget;
95+
nylo.addModelDecoders(modelDecoders);
96+
nylo.addControllers(controllers);
97+
nylo.addApiDecoders(apiDecoders);
9898

9999
return nylo;
100100
}

LabelStoreMax/lib/bootstrap/app.dart

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,7 @@ class AppBuild extends StatelessWidget {
5959

6060
@override
6161
Widget build(BuildContext context) {
62-
Nylo nylo = Backpack.instance.read('nylo');
63-
List<AppTheme> appThemes =
64-
nylo.appThemes.map((appTheme) => appTheme.toAppTheme()).toList();
62+
List<AppTheme> appThemes = Nylo.getAppThemes();
6563
return LocalizedApp(
6664
child: ThemeProvider(
6765
themes: appThemes,

LabelStoreMax/lib/bootstrap/helpers.dart

Lines changed: 3 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ import 'package:flutter_app/bootstrap/enums/symbol_position_enums.dart';
2323
import 'package:flutter_app/bootstrap/extensions.dart';
2424
import 'package:flutter_app/bootstrap/shared_pref/shared_key.dart';
2525
import 'package:flutter_app/config/currency.dart';
26-
import 'package:flutter_app/config/decoders.dart';
27-
import 'package:flutter_app/config/events.dart';
2826
import 'package:flutter_app/config/payment_gateways.dart';
2927
import 'package:flutter_app/resources/widgets/no_results_for_products_widget.dart';
3028
import 'package:flutter_app/resources/widgets/woosignal_ui.dart';
@@ -54,27 +52,10 @@ Future appWooSignal(Function(WooSignal api) api) async {
5452

5553
/// helper to find correct color from the [context].
5654
class ThemeColor {
57-
static ColorStyles get(BuildContext context, {String? themeId}) {
58-
Nylo nylo = Backpack.instance.read('nylo');
59-
List<BaseThemeConfig<ColorStyles>> appThemes =
60-
nylo.appThemes as List<BaseThemeConfig<ColorStyles>>;
61-
62-
if (themeId == null) {
63-
BaseThemeConfig<ColorStyles> themeFound = appThemes.firstWhere(
64-
(theme) =>
65-
theme.id ==
66-
getEnv(Theme.of(context).brightness == Brightness.light
67-
? 'LIGHT_THEME_ID'
68-
: 'DARK_THEME_ID'),
69-
orElse: () => appThemes.first);
70-
return themeFound.colors;
71-
}
55+
static ColorStyles get(BuildContext context, {String? themeId}) =>
56+
nyColorStyle<ColorStyles>(context, themeId: themeId);
7257

73-
BaseThemeConfig<ColorStyles> baseThemeConfig = appThemes.firstWhere(
74-
(theme) => theme.id == themeId,
75-
orElse: () => appThemes.first);
76-
return baseThemeConfig.colors;
77-
}
58+
static Color fromHex(String hexColor) => nyHexColor(hexColor);
7859
}
7960

8061
/// helper to set colors on TextStyle
@@ -649,34 +630,6 @@ Future<BillingDetails> billingDetailsFromWpUserInfoResponse(
649630
return billingDetails;
650631
}
651632

652-
/// API helper
653-
api<T>(dynamic Function(T request) request,
654-
{BuildContext? context,
655-
Map<String, dynamic> headers = const {},
656-
String? bearerToken,
657-
String? baseUrl,
658-
int? page,
659-
String? queryNamePage,
660-
String? queryNamePerPage,
661-
int? perPage,
662-
List<Type> events = const []}) async =>
663-
await nyApi<T>(
664-
request: request,
665-
apiDecoders: apiDecoders,
666-
context: context,
667-
headers: headers,
668-
bearerToken: bearerToken,
669-
baseUrl: baseUrl,
670-
events: events,
671-
page: page,
672-
perPage: perPage,
673-
queryParamPage: queryNamePage ?? "page",
674-
queryParamPerPage: queryNamePerPage
675-
);
676-
677-
/// Event helper
678-
event<T>({Map? data}) async => nyEvent<T>(params: data, events: events);
679-
680633
/// Check if the [Product] is new.
681634
bool isProductNew(Product? product) {
682635
if (product?.dateCreatedGMT == null) false;

LabelStoreMax/pubspec.lock

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ packages:
1313
dependency: transitive
1414
description:
1515
name: _flutterfire_internals
16-
sha256: eb0ac20f704799b986049fbb3c1c16421eca319a1b872378d669513e12452ba5
16+
sha256: f5628cd9c92ed11083f425fd1f8f1bc60ecdda458c81d73b143aeda036c35fe7
1717
url: "https://pub.dev"
1818
source: hosted
19-
version: "1.3.14"
19+
version: "1.3.16"
2020
analyzer:
2121
dependency: "direct main"
2222
description:
@@ -261,10 +261,10 @@ packages:
261261
dependency: "direct main"
262262
description:
263263
name: firebase_core
264-
sha256: d301561d614487688d797717bef013a264c517d1d09e4c5c1325c3a64c835efb
264+
sha256: "96607c0e829a581c2a483c658f04e8b159964c3bae2730f73297070bc85d40bb"
265265
url: "https://pub.dev"
266266
source: hosted
267-
version: "2.24.0"
267+
version: "2.24.2"
268268
firebase_core_platform_interface:
269269
dependency: transitive
270270
description:
@@ -277,34 +277,34 @@ packages:
277277
dependency: transitive
278278
description:
279279
name: firebase_core_web
280-
sha256: "10159d9ee42c79f4548971d92f3f0fcd5791f6738cda3583a4e3b2c8b244c018"
280+
sha256: d585bdf3c656c3f7821ba1bd44da5f13365d22fcecaf5eb75c4295246aaa83c0
281281
url: "https://pub.dev"
282282
source: hosted
283-
version: "2.9.0"
283+
version: "2.10.0"
284284
firebase_messaging:
285285
dependency: "direct main"
286286
description:
287287
name: firebase_messaging
288-
sha256: "260064e1b512a9e1970b5964d645eba888208ca3de42459c38e484c8ecdc37a9"
288+
sha256: b9b94c7d932d83d36efcf7eb21caf50486a8f330c6f681bb68e7b979d036491e
289289
url: "https://pub.dev"
290290
source: hosted
291-
version: "14.7.6"
291+
version: "14.7.8"
292292
firebase_messaging_platform_interface:
293293
dependency: transitive
294294
description:
295295
name: firebase_messaging_platform_interface
296-
sha256: "81fb8c983356dd75ee660f276c918380325df7a1ab1e981ede911809e9ddff30"
296+
sha256: "200f27b70a6330d1ac3f0fbf5328412ef3b215cd9dbb7dcea1701d1fd705d37a"
297297
url: "https://pub.dev"
298298
source: hosted
299-
version: "4.5.15"
299+
version: "4.5.17"
300300
firebase_messaging_web:
301301
dependency: transitive
302302
description:
303303
name: firebase_messaging_web
304-
sha256: "1c5d9b6cf929ab471300143059d1641a26b73c9c24adb5266e241aea23c090aa"
304+
sha256: "1c254306714d4d76aea612d81775e8f18c712219f096a7e6abfa234de9fd4bd2"
305305
url: "https://pub.dev"
306306
source: hosted
307-
version: "3.5.15"
307+
version: "3.5.17"
308308
flare_flutter:
309309
dependency: transitive
310310
description:
@@ -561,10 +561,10 @@ packages:
561561
dependency: "direct dev"
562562
description:
563563
name: lints
564-
sha256: "0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452"
564+
sha256: cbf8d4b858bb0134ef3ef87841abdf8d63bfc255c266b7bf6b39daa1085c4290
565565
url: "https://pub.dev"
566566
source: hosted
567-
version: "2.1.1"
567+
version: "3.0.0"
568568
logging:
569569
dependency: transitive
570570
description:
@@ -617,18 +617,18 @@ packages:
617617
dependency: "direct main"
618618
description:
619619
name: nylo_framework
620-
sha256: dca371fb9362db81eeb40a040d7ddb0c00dc08720cd4b3ea4bc646ec48a2325f
620+
sha256: "2dac32e24ee95eb045c846c0524ee6fde7f86a6c2daa0d44af0c4efe731b54af"
621621
url: "https://pub.dev"
622622
source: hosted
623-
version: "5.13.0"
623+
version: "5.15.0"
624624
nylo_support:
625625
dependency: transitive
626626
description:
627627
name: nylo_support
628-
sha256: "4b1209d56b5ddf0188f840c59f6b989259e4d352d35ca5743410350aa6a59473"
628+
sha256: f27dd076c93d036a2cd298428f3c240c3a8f466a0feb1bffc6134b5ea7d9232b
629629
url: "https://pub.dev"
630630
source: hosted
631-
version: "5.20.0"
631+
version: "5.22.0"
632632
octo_image:
633633
dependency: transitive
634634
description:

LabelStoreMax/pubspec.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Official WooSignal App Template for WooCommerce
22

33
# Label StoreMax
4-
# Version: 6.12.2
4+
# Version: 6.12.3
55
# Author: Anthony Gordon
66
# Homepage: https://woosignal.com
77
# Documentation: https://woosignal.com/docs/app/label-storemax
@@ -29,7 +29,7 @@ dependencies:
2929
google_fonts: ^4.0.5
3030
analyzer: ^5.12.0
3131
intl: ^0.18.0
32-
nylo_framework: ^5.13.0
32+
nylo_framework: ^5.15.0
3333
woosignal: ^3.8.1
3434
wp_json_api: ^3.3.3
3535
cached_network_image: ^3.3.0
@@ -50,8 +50,8 @@ dependencies:
5050
flutter_rating_bar: ^4.0.1
5151
flutter_staggered_grid_view: ^0.7.0
5252
flutter_swiper_view: ^1.1.8
53-
firebase_messaging: ^14.7.6
54-
firebase_core: ^2.24.0
53+
firebase_messaging: ^14.7.8
54+
firebase_core: ^2.24.2
5555
flutter:
5656
sdk: flutter
5757
flutter_localizations:
@@ -70,7 +70,7 @@ dependency_overrides:
7070

7171
dev_dependencies:
7272
flutter_launcher_icons: ^0.13.1
73-
lints: ^2.1.1
73+
lints: ^3.0.0
7474
flutter_test:
7575
sdk: flutter
7676

0 commit comments

Comments
 (0)