Skip to content

Commit 335144f

Browse files
committed
v8.0.0
1 parent 7185a3d commit 335144f

File tree

145 files changed

+4547
-1955
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

145 files changed

+4547
-1955
lines changed

LabelStoreMax/.env

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ APP_DEBUG="true"
66
APP_URL="https://mywoocommercestore.com"
77
API_BASE_URL="https://mywoocommercestore.com"
88

9-
ASSET_PATH_PUBLIC="public/assets/"
10-
ASSET_PATH_IMAGES="public/assets/images"
9+
ASSET_PATH_PUBLIC="public/"
10+
ASSET_PATH_IMAGES="public/images"
1111
TIMEZONE="UTC"
1212

1313
LIGHT_THEME_ID="default_light_theme"

LabelStoreMax/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## [8.0.0] - 2024-12-01
2+
3+
* Update project for Nylo 6.x
4+
* Pubspec.yaml dependency updates
5+
16
## [7.5.7] - 2024-07-31
27

38
* Update order_wc.dart class

LabelStoreMax/analysis_options.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# (the recommended set includes the core lints).
1212
# The core lints are also what is used by pub.dev for scoring packages.
1313

14-
include: package:lints/recommended.yaml
14+
#include: package:flutter_lints/flutter.yaml
1515

1616
# Uncomment the following section to specify additional rules.
1717

LabelStoreMax/android/app/build.gradle

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,23 @@ if (flutterVersionName == null) {
2323
}
2424

2525
android {
26+
namespace "com.woosignal.android"
27+
compileSdk 35
28+
ndkVersion = "25.1.8937393"
29+
2630
packagingOptions {
2731
exclude 'META-INF/DEPENDENCIES'
2832
}
2933

30-
compileSdkVersion 34
34+
compileOptions {
35+
coreLibraryDesugaringEnabled true
36+
sourceCompatibility JavaVersion.VERSION_17
37+
targetCompatibility JavaVersion.VERSION_17
38+
}
39+
40+
kotlinOptions {
41+
jvmTarget = 17
42+
}
3143

3244
sourceSets {
3345
main.java.srcDirs += 'src/main/kotlin'
@@ -60,4 +72,6 @@ flutter {
6072
source '../..'
6173
}
6274

63-
dependencies {}
75+
dependencies {
76+
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.2.2'
77+
}

LabelStoreMax/android/app/src/debug/AndroidManifest.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="com.woosignal.android">
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
32
<!-- Flutter needs it to communicate with the running application
43
to allow setting breakpoints, to provide hot reload, etc.
54
-->

LabelStoreMax/android/app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="com.woosignal.android">
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
32
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
43
calls FlutterMain.startInitialization(this); in its onCreate method.
54
In most cases you can leave this as-is, but you if you want to provide

LabelStoreMax/android/app/src/profile/AndroidManifest.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="com.woosignal.android">
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
32
<!-- Flutter needs it to communicate with the running application
43
to allow setting breakpoints, to provide hot reload, etc.
54
-->
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
org.gradle.jvmargs=-Xmx4G
1+
org.gradle.jvmargs=-Xmx4G -XX:MaxMetaspaceSize=2G -XX:+HeapDumpOnOutOfMemoryError
22
android.useAndroidX=true
3-
android.enableJetifier=true
3+
android.enableJetifier=true
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
#Fri Jun 23 08:50:38 CEST 2017
21
distributionBase=GRADLE_USER_HOME
32
distributionPath=wrapper/dists
43
zipStoreBase=GRADLE_USER_HOME
54
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
5+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip

LabelStoreMax/android/settings.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ pluginManagement {
1919

2020
plugins {
2121
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
22-
id "com.android.application" version "7.3.0" apply false
23-
id "org.jetbrains.kotlin.android" version "1.9.10" apply false
22+
id "com.android.application" version "8.3.2" apply false
23+
id "org.jetbrains.kotlin.android" version "2.0.20" apply false
2424
}
2525

2626
include ":app"

LabelStoreMax/ios/Runner.xcodeproj/project.pbxproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -490,6 +490,7 @@
490490
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
491491
buildSettings = {
492492
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
493+
CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES;
493494
CLANG_ENABLE_MODULES = YES;
494495
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
495496
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
@@ -672,6 +673,7 @@
672673
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
673674
buildSettings = {
674675
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
676+
CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES;
675677
CLANG_ENABLE_MODULES = YES;
676678
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
677679
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
@@ -698,6 +700,7 @@
698700
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
699701
buildSettings = {
700702
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
703+
CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES;
701704
CLANG_ENABLE_MODULES = YES;
702705
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
703706
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";

LabelStoreMax/ios/Runner/AppDelegate.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import UIKit
22
import Flutter
33

4-
@UIApplicationMain
4+
@main
55
@objc class AppDelegate: FlutterAppDelegate {
66
override func application(
77
_ application: UIApplication,

LabelStoreMax/ios/Runner/Info.plist

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@
2828
<true/>
2929
<key>UIApplicationSupportsIndirectInputEvents</key>
3030
<true/>
31+
<key>UIBackgroundModes</key>
32+
<array>
33+
<string>remote-notification</string>
34+
<string>fetch</string>
35+
<string>processing</string>
36+
</array>
3137
<key>UILaunchStoryboardName</key>
3238
<string>LaunchScreen</string>
3339
<key>UIMainStoryboardFile</key>
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
33
<plist version="1.0">
4-
<dict/>
4+
<dict>
5+
<key>aps-environment</key>
6+
<string>development</string>
7+
</dict>
58
</plist>

LabelStoreMax/lib/app/controllers/controller.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
import 'package:nylo_framework/nylo_framework.dart';
1212

1313
/// Base Controller for the Nylo
14-
/// See more on controllers here - https://nylo.dev/docs/5.20.0/controllers
14+
/// See more on controllers here - https://nylo.dev/docs/6.x/controllers
1515
class Controller extends NyController {
1616
Controller();
1717
}

LabelStoreMax/lib/app/controllers/product_detail_controller.dart

Lines changed: 5 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
import 'package:flutter/material.dart';
1212
import '/app/models/cart.dart';
1313
import '/app/models/cart_line_item.dart';
14-
import '/bootstrap/enums/wishlist_action_enums.dart';
1514
import '/bootstrap/helpers.dart';
1615
import '/resources/widgets/cart_quantity_widget.dart';
1716
import '/resources/widgets/product_quantity_widget.dart';
@@ -26,14 +25,8 @@ class ProductDetailController extends Controller {
2625
int quantity = 1;
2726
Product? product;
2827

29-
@override
30-
construct(BuildContext context) {
31-
super.construct(context);
32-
product = data() as Product?;
33-
}
34-
3528
viewExternalProduct() {
36-
if (product!.externalUrl != null && product!.externalUrl!.isNotEmpty) {
29+
if (product?.externalUrl?.isNotEmpty ?? false) {
3730
openBrowserTab(url: product!.externalUrl!);
3831
}
3932
}
@@ -55,13 +48,13 @@ class ProductDetailController extends Controller {
5548
}
5649

5750
addQuantityTapped({Function? onSuccess}) {
58-
if (product!.manageStock != null && product!.manageStock == true) {
59-
if (quantity >= product!.stockQuantity!) {
51+
if (product?.manageStock == true) {
52+
if (quantity >= (product?.stockQuantity ?? 0)) {
6053
showToastNotification(context!,
6154
title: trans("Maximum quantity reached"),
6255
description:
63-
"${trans("Sorry, only")} ${product!.stockQuantity} ${trans("left")}",
64-
style: ToastNotificationStyleType.INFO);
56+
"${trans("Sorry, only")} ${product?.stockQuantity ?? "0"} ${trans("left")}",
57+
style: ToastNotificationStyleType.info);
6558
return;
6659
}
6760
}
@@ -86,28 +79,6 @@ class ProductDetailController extends Controller {
8679
}
8780
}
8881

89-
toggleWishList(
90-
{required Function onSuccess,
91-
required WishlistAction wishlistAction}) async {
92-
String subtitleMsg;
93-
if (wishlistAction == WishlistAction.remove) {
94-
await removeWishlistProduct(product: product);
95-
subtitleMsg = trans("This product has been removed from your wishlist");
96-
} else {
97-
await saveWishlistProduct(product: product);
98-
subtitleMsg = trans("This product has been added to your wishlist");
99-
}
100-
showStatusAlert(
101-
context,
102-
title: trans("Success"),
103-
subtitle: subtitleMsg,
104-
icon: Icons.favorite,
105-
duration: 1,
106-
);
107-
108-
onSuccess();
109-
}
110-
11182
ws_product_variation.ProductVariation? findProductVariation(
11283
{required Map<int, dynamic> tmpAttributeObj,
11384
required List<ws_product_variation.ProductVariation> productVariations}) {
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import '/resources/pages/cart_page.dart';
2+
import 'package:nylo_framework/nylo_framework.dart';
3+
4+
import '/resources/widgets/shopping_cart_total_widget.dart';
5+
import '/app/models/cart.dart';
6+
7+
class CartRemoveAllEvent implements NyEvent {
8+
@override
9+
final listeners = {
10+
DefaultListener: DefaultListener(),
11+
};
12+
}
13+
14+
class DefaultListener extends NyListener {
15+
@override
16+
handle(dynamic event) async {
17+
await Cart.getInstance.clear();
18+
19+
// update states
20+
updateState(ShoppingCartTotal.state);
21+
NyListView.stateReset("shopping_cart_items_list_view");
22+
updateState(CartPage.path, data: {"action": "showToastCartCleared"});
23+
}
24+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import '/resources/widgets/cart_quantity_widget.dart';
2+
import '/resources/pages/cart_page.dart';
3+
import 'package:nylo_framework/nylo_framework.dart';
4+
5+
import '/resources/widgets/shopping_cart_total_widget.dart';
6+
import '/app/models/cart.dart';
7+
import '/app/models/cart_line_item.dart';
8+
9+
class CartRemoveItemEvent implements NyEvent {
10+
@override
11+
final listeners = {
12+
DefaultListener: DefaultListener(),
13+
};
14+
}
15+
16+
class DefaultListener extends NyListener {
17+
@override
18+
handle(dynamic event) async {
19+
CartLineItem cartLineItem = event["cartLineItem"];
20+
bool complete = (await Cart.getInstance.removeCartItem(cartLineItem));
21+
if (complete != true) {
22+
return;
23+
}
24+
25+
// update states
26+
updateState(CartPage.path, data: {"action": "showToastCartItemRemoved"});
27+
28+
updateState(ShoppingCartTotal.state);
29+
NyListView.stateReset("shopping_cart_items_list_view");
30+
updateState(CartQuantity.state);
31+
}
32+
}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
import 'package:firebase_messaging/firebase_messaging.dart';
2+
import '/resources/pages/browse_category_page.dart';
3+
import 'package:nylo_framework/nylo_framework.dart';
4+
import 'package:wp_json_api/wp_json_api.dart';
5+
6+
class CategoryNotificationEvent implements NyEvent {
7+
@override
8+
final listeners = {
9+
DefaultListener: DefaultListener(),
10+
};
11+
}
12+
13+
class DefaultListener extends NyListener {
14+
@override
15+
handle(dynamic event) async {
16+
RemoteMessage message = event['RemoteMessage'];
17+
18+
if (!message.data.containsKey('order_id')) {
19+
return;
20+
}
21+
if (!message.data.containsKey('user_id')) {
22+
return;
23+
}
24+
25+
String userId = message.data['user_id'];
26+
27+
if ((await WPJsonAPI.wpUserLoggedIn()) != true) {
28+
return;
29+
}
30+
31+
String? currentUserId = await WPJsonAPI.wpUserId();
32+
if (currentUserId != userId) {
33+
return;
34+
}
35+
36+
routeTo(BrowseCategoryPage.path,
37+
data: int.parse(message.data['category_id']));
38+
}
39+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import 'package:nylo_framework/nylo_framework.dart';
2+
3+
/* Login Form
4+
|--------------------------------------------------------------------------
5+
| Usage: https://nylo.dev/docs/6.x/forms#how-it-works
6+
| Casts: https://nylo.dev/docs/6.x/forms#form-casts
7+
| Validation Rules: https://nylo.dev/docs/6.x/validation#validation-rules
8+
|-------------------------------------------------------------------------- */
9+
10+
class LoginForm extends NyFormData {
11+
LoginForm({String? name}) : super(name ?? "login");
12+
13+
@override
14+
fields() => [
15+
Field.email(
16+
"Email",
17+
style: "compact",
18+
validate: FormValidator.email(),
19+
),
20+
Field.password(
21+
"Password",
22+
style: "compact",
23+
viewable: true,
24+
validate: FormValidator.password(),
25+
),
26+
];
27+
}

0 commit comments

Comments
 (0)