Skip to content

Commit 1714966

Browse files
committed
v3.11.0
1 parent e394633 commit 1714966

File tree

7 files changed

+31
-14
lines changed

7 files changed

+31
-14
lines changed

.flutter-plugins-dependencies

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"device_info_plus","path":"/Users/anthony/.pub-cache/hosted/pub.dev/device_info_plus-9.1.2/","native_build":true,"dependencies":[]},{"name":"flutter_secure_storage","path":"/Users/anthony/.pub-cache/hosted/pub.dev/flutter_secure_storage-9.0.0/","native_build":true,"dependencies":[]},{"name":"path_provider_foundation","path":"/Users/anthony/.pub-cache/hosted/pub.dev/path_provider_foundation-2.2.4/","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"shared_preferences_foundation","path":"/Users/anthony/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.2.2/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"android":[{"name":"device_info_plus","path":"/Users/anthony/.pub-cache/hosted/pub.dev/device_info_plus-9.1.2/","native_build":true,"dependencies":[]},{"name":"flutter_secure_storage","path":"/Users/anthony/.pub-cache/hosted/pub.dev/flutter_secure_storage-9.0.0/","native_build":true,"dependencies":[]},{"name":"path_provider_android","path":"/Users/anthony/.pub-cache/hosted/pub.dev/path_provider_android-2.0.27/","native_build":true,"dependencies":[]},{"name":"shared_preferences_android","path":"/Users/anthony/.pub-cache/hosted/pub.dev/shared_preferences_android-2.1.4/","native_build":true,"dependencies":[]}],"macos":[{"name":"device_info_plus","path":"/Users/anthony/.pub-cache/hosted/pub.dev/device_info_plus-9.1.2/","native_build":true,"dependencies":[]},{"name":"flutter_secure_storage_macos","path":"/Users/anthony/.pub-cache/hosted/pub.dev/flutter_secure_storage_macos-3.0.1/","native_build":true,"dependencies":[]},{"name":"path_provider_foundation","path":"/Users/anthony/.pub-cache/hosted/pub.dev/path_provider_foundation-2.2.4/","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"shared_preferences_foundation","path":"/Users/anthony/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.2.2/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"linux":[{"name":"device_info_plus","path":"/Users/anthony/.pub-cache/hosted/pub.dev/device_info_plus-9.1.2/","native_build":false,"dependencies":[]},{"name":"flutter_secure_storage_linux","path":"/Users/anthony/.pub-cache/hosted/pub.dev/flutter_secure_storage_linux-1.2.0/","native_build":true,"dependencies":[]},{"name":"path_provider_linux","path":"/Users/anthony/.pub-cache/hosted/pub.dev/path_provider_linux-2.1.8/","native_build":false,"dependencies":[]},{"name":"shared_preferences_linux","path":"/Users/anthony/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.2.0/","native_build":false,"dependencies":["path_provider_linux"]}],"windows":[{"name":"device_info_plus","path":"/Users/anthony/.pub-cache/hosted/pub.dev/device_info_plus-9.1.2/","native_build":false,"dependencies":[]},{"name":"flutter_secure_storage_windows","path":"/Users/anthony/.pub-cache/hosted/pub.dev/flutter_secure_storage_windows-3.0.0/","native_build":true,"dependencies":[]},{"name":"path_provider_windows","path":"/Users/anthony/.pub-cache/hosted/pub.dev/path_provider_windows-2.1.7/","native_build":false,"dependencies":[]},{"name":"shared_preferences_windows","path":"/Users/anthony/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.2.0/","native_build":false,"dependencies":["path_provider_windows"]}],"web":[{"name":"device_info_plus","path":"/Users/anthony/.pub-cache/hosted/pub.dev/device_info_plus-9.1.2/","dependencies":[]},{"name":"flutter_secure_storage_web","path":"/Users/anthony/.pub-cache/hosted/pub.dev/flutter_secure_storage_web-1.1.2/","dependencies":[]},{"name":"shared_preferences_web","path":"/Users/anthony/.pub-cache/hosted/pub.dev/shared_preferences_web-2.1.0/","dependencies":[]}]},"dependencyGraph":[{"name":"device_info_plus","dependencies":[]},{"name":"flutter_secure_storage","dependencies":["flutter_secure_storage_linux","flutter_secure_storage_macos","flutter_secure_storage_web","flutter_secure_storage_windows"]},{"name":"flutter_secure_storage_linux","dependencies":[]},{"name":"flutter_secure_storage_macos","dependencies":[]},{"name":"flutter_secure_storage_web","dependencies":[]},{"name":"flutter_secure_storage_windows","dependencies":["path_provider"]},{"name":"path_provider","dependencies":["path_provider_android","path_provider_foundation","path_provider_linux","path_provider_windows"]},{"name":"path_provider_android","dependencies":[]},{"name":"path_provider_foundation","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_android","shared_preferences_foundation","shared_preferences_linux","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_android","dependencies":[]},{"name":"shared_preferences_foundation","dependencies":[]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]}],"date_created":"2024-03-07 17:33:00.197510","version":"3.19.2"}
1+
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"device_info_plus","path":"/Users/anthony/.pub-cache/hosted/pub.dev/device_info_plus-9.1.2/","native_build":true,"dependencies":[]},{"name":"flutter_secure_storage","path":"/Users/anthony/.pub-cache/hosted/pub.dev/flutter_secure_storage-9.0.0/","native_build":true,"dependencies":[]},{"name":"path_provider_foundation","path":"/Users/anthony/.pub-cache/hosted/pub.dev/path_provider_foundation-2.2.4/","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"shared_preferences_foundation","path":"/Users/anthony/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.2.2/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"android":[{"name":"device_info_plus","path":"/Users/anthony/.pub-cache/hosted/pub.dev/device_info_plus-9.1.2/","native_build":true,"dependencies":[]},{"name":"flutter_secure_storage","path":"/Users/anthony/.pub-cache/hosted/pub.dev/flutter_secure_storage-9.0.0/","native_build":true,"dependencies":[]},{"name":"path_provider_android","path":"/Users/anthony/.pub-cache/hosted/pub.dev/path_provider_android-2.0.27/","native_build":true,"dependencies":[]},{"name":"shared_preferences_android","path":"/Users/anthony/.pub-cache/hosted/pub.dev/shared_preferences_android-2.1.4/","native_build":true,"dependencies":[]}],"macos":[{"name":"device_info_plus","path":"/Users/anthony/.pub-cache/hosted/pub.dev/device_info_plus-9.1.2/","native_build":true,"dependencies":[]},{"name":"flutter_secure_storage_macos","path":"/Users/anthony/.pub-cache/hosted/pub.dev/flutter_secure_storage_macos-3.0.1/","native_build":true,"dependencies":[]},{"name":"path_provider_foundation","path":"/Users/anthony/.pub-cache/hosted/pub.dev/path_provider_foundation-2.2.4/","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"shared_preferences_foundation","path":"/Users/anthony/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.2.2/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"linux":[{"name":"device_info_plus","path":"/Users/anthony/.pub-cache/hosted/pub.dev/device_info_plus-9.1.2/","native_build":false,"dependencies":[]},{"name":"flutter_secure_storage_linux","path":"/Users/anthony/.pub-cache/hosted/pub.dev/flutter_secure_storage_linux-1.2.0/","native_build":true,"dependencies":[]},{"name":"path_provider_linux","path":"/Users/anthony/.pub-cache/hosted/pub.dev/path_provider_linux-2.1.8/","native_build":false,"dependencies":[]},{"name":"shared_preferences_linux","path":"/Users/anthony/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.2.0/","native_build":false,"dependencies":["path_provider_linux"]}],"windows":[{"name":"device_info_plus","path":"/Users/anthony/.pub-cache/hosted/pub.dev/device_info_plus-9.1.2/","native_build":false,"dependencies":[]},{"name":"flutter_secure_storage_windows","path":"/Users/anthony/.pub-cache/hosted/pub.dev/flutter_secure_storage_windows-3.0.0/","native_build":true,"dependencies":[]},{"name":"path_provider_windows","path":"/Users/anthony/.pub-cache/hosted/pub.dev/path_provider_windows-2.1.7/","native_build":false,"dependencies":[]},{"name":"shared_preferences_windows","path":"/Users/anthony/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.2.0/","native_build":false,"dependencies":["path_provider_windows"]}],"web":[{"name":"device_info_plus","path":"/Users/anthony/.pub-cache/hosted/pub.dev/device_info_plus-9.1.2/","dependencies":[]},{"name":"flutter_secure_storage_web","path":"/Users/anthony/.pub-cache/hosted/pub.dev/flutter_secure_storage_web-1.1.2/","dependencies":[]},{"name":"shared_preferences_web","path":"/Users/anthony/.pub-cache/hosted/pub.dev/shared_preferences_web-2.1.0/","dependencies":[]}]},"dependencyGraph":[{"name":"device_info_plus","dependencies":[]},{"name":"flutter_secure_storage","dependencies":["flutter_secure_storage_linux","flutter_secure_storage_macos","flutter_secure_storage_web","flutter_secure_storage_windows"]},{"name":"flutter_secure_storage_linux","dependencies":[]},{"name":"flutter_secure_storage_macos","dependencies":[]},{"name":"flutter_secure_storage_web","dependencies":[]},{"name":"flutter_secure_storage_windows","dependencies":["path_provider"]},{"name":"path_provider","dependencies":["path_provider_android","path_provider_foundation","path_provider_linux","path_provider_windows"]},{"name":"path_provider_android","dependencies":[]},{"name":"path_provider_foundation","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_android","shared_preferences_foundation","shared_preferences_linux","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_android","dependencies":[]},{"name":"shared_preferences_foundation","dependencies":[]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]}],"date_created":"2024-03-11 10:53:06.658421","version":"3.19.2"}

.idea/libraries/Dart_Packages.xml

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## [3.11.0] - 2024-03-11
2+
3+
* Ability to set the users WP User ID in the networking class
4+
15
## [3.10.0] - 2024-03-07
26

37
* Added the ability to fetch the order of your product categories from WooSignal

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ In your flutter project add the dependency:
1515
``` dart
1616
dependencies:
1717
...
18-
woosignal: ^3.10.0
18+
woosignal: ^3.11.0
1919
```
2020

2121
### Usage example #

lib/networking/api_provider.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,12 @@ class ApiProvider {
7070
};
7171
}
7272

73+
/// set the WP user id
74+
void setWpUserId(String wpUserId) {
75+
_deviceMeta['wp_user_id'] = wpUserId;
76+
_setDioHeaders();
77+
}
78+
7379
/// set the FCM token
7480
void setFcmToken(String token) {
7581
if (_deviceMeta.containsKey('fcm_token')) {

lib/woosignal.dart

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ import 'package:encrypt/encrypt.dart' as enc;
5757
import 'package:encrypt/encrypt.dart';
5858

5959
/// WooSignal Package version
60-
const String wooSignalVersion = "3.10.0";
60+
const String _wooSignalVersion = "3.11.0";
6161

6262
class WooSignal {
6363
WooSignal._privateConstructor();
@@ -67,6 +67,8 @@ class WooSignal {
6767
bool? _debugMode;
6868
String? _encryptKey, _encryptSecret;
6969

70+
String get version => _wooSignalVersion;
71+
7072
/// Initialize the class
7173
Future<void> init(
7274
{required String? appKey,
@@ -76,7 +78,7 @@ class WooSignal {
7678
assert(appKey != null && appKey != "",
7779
"Provide a valid app key. Visit https://woosignal.com");
7880
_apiProvider = ApiProvider(
79-
appKey: appKey!, debugMode: debugMode, version: wooSignalVersion);
81+
appKey: appKey!, debugMode: debugMode, version: version);
8082
setDebugMode(debugMode);
8183
if (encryptKey != null) {
8284
_encryptKey = encryptKey;
@@ -92,6 +94,11 @@ class WooSignal {
9294
_apiProvider.setFcmToken(token);
9395
}
9496

97+
/// Set the Wp User ID for notifications
98+
void setWpUserId(String userId) {
99+
_apiProvider.setWpUserId(userId);
100+
}
101+
95102
/// Enable debug mode for logging information
96103
void setDebugMode(bool debugMode) {
97104
_debugMode = debugMode;

pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: woosignal
22
description: WooCommerce REST API for dart, connect a WooCommerce store and start developing with our interface for their API endpoints.
3-
version: 3.10.0
3+
version: 3.11.0
44
homepage: https://woosignal.com
55
repository: https://github.com/woosignal/flutter-woocommerce-api
66
issue_tracker: https://github.com/woosignal/flutter-woocommerce-api/issues
@@ -11,7 +11,7 @@ environment:
1111

1212
dependencies:
1313
dio: ^5.4.0
14-
device_meta: ^1.1.12
14+
device_meta: ^1.1.13
1515
encrypt: ^5.0.3
1616

1717
flutter:

0 commit comments

Comments
 (0)