v6.7.0
This commit is contained in:
parent
f67f486838
commit
456f313056
@ -51,4 +51,5 @@ RAZORPAY_API_KEY=""
|
|||||||
PRODUCT_PLACEHOLDER_IMAGE="https://woosignal.com/images/woocommerce-placeholder.png"
|
PRODUCT_PLACEHOLDER_IMAGE="https://woosignal.com/images/woocommerce-placeholder.png"
|
||||||
# Sets the default placeholder image for products with no image
|
# Sets the default placeholder image for products with no image
|
||||||
|
|
||||||
AUTH_USER_KEY="AUTH_USER"
|
AUTH_USER_KEY="AUTH_USER"
|
||||||
|
FCM_ENABLED=false
|
||||||
@ -1,3 +1,9 @@
|
|||||||
|
## [6.7.0] - 2023-06-20
|
||||||
|
|
||||||
|
* Refactor project for Nylo 5.x.
|
||||||
|
* New Firebase provider for FCM.
|
||||||
|
* Pubspec.yaml dependency updates.
|
||||||
|
|
||||||
## [6.6.2] - 2023-06-14
|
## [6.6.2] - 2023-06-14
|
||||||
|
|
||||||
* Page bug fixes
|
* Page bug fixes
|
||||||
@ -33,7 +39,7 @@
|
|||||||
* Fix the ThemeColor.get helper method to support ColorStyles.
|
* Fix the ThemeColor.get helper method to support ColorStyles.
|
||||||
* Pubspec.yaml dependency updates
|
* Pubspec.yaml dependency updates
|
||||||
|
|
||||||
* ## [6.4.0] - 2023-01-06
|
## [6.4.0] - 2023-01-06
|
||||||
|
|
||||||
* Upgrade to Nylo v4.0.0
|
* Upgrade to Nylo v4.0.0
|
||||||
* Update copyright
|
* Update copyright
|
||||||
|
|||||||
@ -16,7 +16,7 @@ class BearerAuthInterceptor extends Interceptor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void onError(DioError err, ErrorInterceptorHandler handler) {
|
void onError(DioException err, ErrorInterceptorHandler handler) {
|
||||||
handler.next(err);
|
handler.next(err);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -18,7 +18,7 @@ class LoggingInterceptor extends Interceptor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void onError(DioError err, ErrorInterceptorHandler handler) {
|
void onError(DioException err, ErrorInterceptorHandler handler) {
|
||||||
print(
|
print(
|
||||||
'ERROR[${err.response?.statusCode}] => PATH: ${err.requestOptions.path}');
|
'ERROR[${err.response?.statusCode}] => PATH: ${err.requestOptions.path}');
|
||||||
handler.next(err);
|
handler.next(err);
|
||||||
|
|||||||
@ -24,30 +24,6 @@ class AppProvider implements NyProvider {
|
|||||||
await WooSignal.instance
|
await WooSignal.instance
|
||||||
.init(appKey: getEnv('APP_KEY'), debugMode: getEnv('APP_DEBUG'));
|
.init(appKey: getEnv('APP_KEY'), debugMode: getEnv('APP_DEBUG'));
|
||||||
|
|
||||||
// Notifications
|
|
||||||
/// await Firebase.initializeApp(
|
|
||||||
/// options: DefaultFirebaseOptions.currentPlatform,
|
|
||||||
/// );
|
|
||||||
///
|
|
||||||
/// FirebaseMessaging messaging = FirebaseMessaging.instance;
|
|
||||||
///
|
|
||||||
/// NotificationSettings settings = await messaging.requestPermission(
|
|
||||||
/// alert: true,
|
|
||||||
/// announcement: false,
|
|
||||||
/// badge: true,
|
|
||||||
/// carPlay: false,
|
|
||||||
/// criticalAlert: false,
|
|
||||||
/// provisional: false,
|
|
||||||
/// sound: true,
|
|
||||||
/// );
|
|
||||||
///
|
|
||||||
/// if (settings.authorizationStatus == AuthorizationStatus.authorized) {
|
|
||||||
/// String? token = await messaging.getToken();
|
|
||||||
/// if (token != null) {
|
|
||||||
/// WooSignal.instance.setFcmToken(token);
|
|
||||||
/// }
|
|
||||||
/// }
|
|
||||||
|
|
||||||
AppHelper.instance.appConfig = WooSignalApp();
|
AppHelper.instance.appConfig = WooSignalApp();
|
||||||
AppHelper.instance.appConfig!.themeFont = "Poppins";
|
AppHelper.instance.appConfig!.themeFont = "Poppins";
|
||||||
AppHelper.instance.appConfig!.themeColors = {
|
AppHelper.instance.appConfig!.themeColors = {
|
||||||
@ -124,4 +100,4 @@ class AppProvider implements NyProvider {
|
|||||||
afterBoot(Nylo nylo) async {
|
afterBoot(Nylo nylo) async {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
41
LabelStoreMax/lib/app/providers/firebase_provider.dart
Normal file
41
LabelStoreMax/lib/app/providers/firebase_provider.dart
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
import 'package:firebase_core/firebase_core.dart';
|
||||||
|
import 'package:firebase_messaging/firebase_messaging.dart';
|
||||||
|
import 'package:flutter_app/firebase_options.dart';
|
||||||
|
import 'package:nylo_framework/nylo_framework.dart';
|
||||||
|
import 'package:woosignal/woosignal.dart';
|
||||||
|
|
||||||
|
class FirebaseProvider implements NyProvider {
|
||||||
|
|
||||||
|
boot(Nylo nylo) async {
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
afterBoot(Nylo nylo) async {
|
||||||
|
if (getEnv('FCM_ENABLED') != true) return;
|
||||||
|
|
||||||
|
await Firebase.initializeApp(
|
||||||
|
options: DefaultFirebaseOptions.currentPlatform,
|
||||||
|
);
|
||||||
|
|
||||||
|
FirebaseMessaging messaging = FirebaseMessaging.instance;
|
||||||
|
NotificationSettings settings = await messaging.requestPermission(
|
||||||
|
alert: true,
|
||||||
|
announcement: false,
|
||||||
|
badge: true,
|
||||||
|
carPlay: false,
|
||||||
|
criticalAlert: false,
|
||||||
|
provisional: false,
|
||||||
|
sound: true,
|
||||||
|
);
|
||||||
|
|
||||||
|
if (settings.authorizationStatus != AuthorizationStatus.authorized) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
String? token = await messaging.getToken();
|
||||||
|
if (token != null) {
|
||||||
|
WooSignal.instance.setFcmToken(token);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,3 +1,4 @@
|
|||||||
|
import '/app/providers/firebase_provider.dart';
|
||||||
import 'package:flutter_app/app/providers/app_provider.dart';
|
import 'package:flutter_app/app/providers/app_provider.dart';
|
||||||
import 'package:flutter_app/app/providers/event_provider.dart';
|
import 'package:flutter_app/app/providers/event_provider.dart';
|
||||||
import 'package:flutter_app/app/providers/route_provider.dart';
|
import 'package:flutter_app/app/providers/route_provider.dart';
|
||||||
@ -17,4 +18,7 @@ final Map<Type, NyProvider> providers = {
|
|||||||
AppProvider: AppProvider(),
|
AppProvider: AppProvider(),
|
||||||
RouteProvider: RouteProvider(),
|
RouteProvider: RouteProvider(),
|
||||||
EventProvider: EventProvider(),
|
EventProvider: EventProvider(),
|
||||||
|
FirebaseProvider: FirebaseProvider(),
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -8,9 +8,9 @@
|
|||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
final Map<Type, dynamic> validationRules = {
|
final Map<String, dynamic> validationRules = {
|
||||||
/// Example
|
/// Example
|
||||||
// SimplePassword: (attribute) => SimplePassword(attribute)
|
// "simple_password": (attribute) => SimplePassword(attribute)
|
||||||
};
|
};
|
||||||
|
|
||||||
/// Example validation class
|
/// Example validation class
|
||||||
|
|||||||
59
LabelStoreMax/lib/firebase_options.dart
Normal file
59
LabelStoreMax/lib/firebase_options.dart
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
// ignore_for_file: lines_longer_than_80_chars, avoid_classes_with_only_static_members
|
||||||
|
import 'package:firebase_core/firebase_core.dart' show FirebaseOptions;
|
||||||
|
import 'package:flutter/foundation.dart'
|
||||||
|
show defaultTargetPlatform, kIsWeb, TargetPlatform;
|
||||||
|
|
||||||
|
/// Default [FirebaseOptions] for use with your Firebase apps.
|
||||||
|
class DefaultFirebaseOptions {
|
||||||
|
static FirebaseOptions get currentPlatform {
|
||||||
|
if (kIsWeb) {
|
||||||
|
throw UnsupportedError(
|
||||||
|
'DefaultFirebaseOptions have not been configured for web - '
|
||||||
|
'you can reconfigure this by running the FlutterFire CLI again.',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
switch (defaultTargetPlatform) {
|
||||||
|
case TargetPlatform.android:
|
||||||
|
return android;
|
||||||
|
case TargetPlatform.iOS:
|
||||||
|
return ios;
|
||||||
|
case TargetPlatform.macOS:
|
||||||
|
throw UnsupportedError(
|
||||||
|
'DefaultFirebaseOptions have not been configured for macos - '
|
||||||
|
'you can reconfigure this by running the FlutterFire CLI again.',
|
||||||
|
);
|
||||||
|
case TargetPlatform.windows:
|
||||||
|
throw UnsupportedError(
|
||||||
|
'DefaultFirebaseOptions have not been configured for windows - '
|
||||||
|
'you can reconfigure this by running the FlutterFire CLI again.',
|
||||||
|
);
|
||||||
|
case TargetPlatform.linux:
|
||||||
|
throw UnsupportedError(
|
||||||
|
'DefaultFirebaseOptions have not been configured for linux - '
|
||||||
|
'you can reconfigure this by running the FlutterFire CLI again.',
|
||||||
|
);
|
||||||
|
default:
|
||||||
|
throw UnsupportedError(
|
||||||
|
'DefaultFirebaseOptions are not supported for this platform.',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static const FirebaseOptions android = FirebaseOptions(
|
||||||
|
apiKey: '',
|
||||||
|
appId: '',
|
||||||
|
messagingSenderId: '',
|
||||||
|
projectId: '',
|
||||||
|
storageBucket: '',
|
||||||
|
);
|
||||||
|
|
||||||
|
static const FirebaseOptions ios = FirebaseOptions(
|
||||||
|
apiKey: '',
|
||||||
|
appId: '',
|
||||||
|
messagingSenderId: '',
|
||||||
|
projectId: '',
|
||||||
|
storageBucket: '',
|
||||||
|
iosClientId: '',
|
||||||
|
iosBundleId: '',
|
||||||
|
);
|
||||||
|
}
|
||||||
@ -67,7 +67,8 @@ class _AccountDeletePageState extends NyState<AccountDeletePage> {
|
|||||||
PrimaryButton(
|
PrimaryButton(
|
||||||
title: trans("Yes, delete my account"),
|
title: trans("Yes, delete my account"),
|
||||||
isLoading: isLocked('delete_account'),
|
isLoading: isLocked('delete_account'),
|
||||||
action: _deleteAccount),
|
action: _deleteAccount,
|
||||||
|
),
|
||||||
LinkButton(title: trans("Back"), action: pop)
|
LinkButton(title: trans("Back"), action: pop)
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|||||||
@ -62,11 +62,10 @@ class _AccountOrderDetailPageState extends NyState<AccountOrderDetailPage> {
|
|||||||
Padding(
|
Padding(
|
||||||
padding: EdgeInsets.only(top: 8),
|
padding: EdgeInsets.only(top: 8),
|
||||||
child: Text(
|
child: Text(
|
||||||
"${trans("Date Ordered").capitalize()}: " +
|
"${trans("Date Ordered").capitalize()}: ${dateFormatted(
|
||||||
dateFormatted(
|
date: _order?.dateCreated ?? "",
|
||||||
date: _order!.dateCreated!,
|
formatType: formatForDateTime(FormatType.date),
|
||||||
formatType: formatForDateTime(FormatType.date),
|
)}",
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Container(
|
Container(
|
||||||
|
|||||||
@ -415,10 +415,10 @@ packages:
|
|||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: flutter_stripe
|
name: flutter_stripe
|
||||||
sha256: "317be4a0c5bbc02170449d62615c0667d018a16fdd43e7e8dbf7cb121ea6f5fd"
|
sha256: fb1a0647867a26b1fced98706ef96c664a5ae2579e29b67af5ddd054e01d83df
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "9.2.1"
|
version: "9.2.2"
|
||||||
flutter_styled_toast:
|
flutter_styled_toast:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -617,18 +617,18 @@ packages:
|
|||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: nylo_framework
|
name: nylo_framework
|
||||||
sha256: c60cd540f890b6f92cc9fe1345faceec31523b2616ecc22df2d536acd3396061
|
sha256: "905f0f013413ab07433b37aeab2ac05865dea0dc7c2cf93336b881cd5eeb32e4"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "5.0.6"
|
version: "5.1.0"
|
||||||
nylo_support:
|
nylo_support:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: nylo_support
|
name: nylo_support
|
||||||
sha256: "4304c0bffabfa26592da637583e6f50215ac8d3dd6848a1c1e3b1e3d9b766702"
|
sha256: "7324d3fccb315619a28ce292d15f8ac1150aa6111faddbf1de991305fdf80479"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "5.2.2"
|
version: "5.3.0"
|
||||||
octo_image:
|
octo_image:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -950,10 +950,10 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: stripe_platform_interface
|
name: stripe_platform_interface
|
||||||
sha256: "8148f5fb15ed7fd9236559edfd72260657c03904cfe67d3ebba7eeaa20bb4261"
|
sha256: "321de409f41088e842140a8e8b334b1111cc6072dfb2fa9e6452155187e8ff2d"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "9.2.1"
|
version: "9.2.2"
|
||||||
synchronized:
|
synchronized:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|||||||
@ -1,14 +1,14 @@
|
|||||||
# Official WooSignal App Template for WooCommerce
|
# Official WooSignal App Template for WooCommerce
|
||||||
|
|
||||||
# Label StoreMax
|
# Label StoreMax
|
||||||
# Version: 6.6.2
|
# Version: 6.7.0
|
||||||
# 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
|
||||||
|
|
||||||
### Change App Icon
|
### Change App Icon
|
||||||
# 1 Replace: public/assets/icon/appicon.png (1024px1024px icon size)
|
# 1 Replace: public/assets/icon/appicon.png (1024px1024px icon size)
|
||||||
# 2 Run this command from the terminal: "flutter pub run flutter_launcher_icons:main"
|
# 2 Run this command from the terminal: "dart pub run flutter_launcher_icons:main"
|
||||||
|
|
||||||
### Uploading the IOS/Android app
|
### Uploading the IOS/Android app
|
||||||
# IOS https://flutter.dev/docs/deployment/ios
|
# IOS https://flutter.dev/docs/deployment/ios
|
||||||
@ -29,7 +29,7 @@ dependencies:
|
|||||||
google_fonts: ^4.0.5
|
google_fonts: ^4.0.5
|
||||||
analyzer: ^5.12.0
|
analyzer: ^5.12.0
|
||||||
intl: ^0.18.0
|
intl: ^0.18.0
|
||||||
nylo_framework: ^5.0.6
|
nylo_framework: ^5.1.0
|
||||||
woosignal: ^3.5.0
|
woosignal: ^3.5.0
|
||||||
wp_json_api: ^3.3.2
|
wp_json_api: ^3.3.2
|
||||||
cached_network_image: ^3.2.3
|
cached_network_image: ^3.2.3
|
||||||
@ -60,8 +60,8 @@ dependencies:
|
|||||||
# The following adds the Cupertino Icons font to your application.
|
# The following adds the Cupertino Icons font to your application.
|
||||||
# Use with the CupertinoIcons class for iOS style icons.
|
# Use with the CupertinoIcons class for iOS style icons.
|
||||||
cupertino_icons: ^1.0.5
|
cupertino_icons: ^1.0.5
|
||||||
collection: ^1.15.0
|
collection: ^1.17.1
|
||||||
flutter_stripe: ^9.2.1
|
flutter_stripe: ^9.2.2
|
||||||
razorpay_flutter: ^1.3.5
|
razorpay_flutter: ^1.3.5
|
||||||
|
|
||||||
dependency_overrides:
|
dependency_overrides:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user