Skip to content

Commit d3cc7c1

Browse files
committed
v3.9.2
1 parent bdcbf64 commit d3cc7c1

File tree

7 files changed

+45
-84
lines changed

7 files changed

+45
-84
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.0.3/","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.0.3/","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.0.3/","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.0.3/","native_build":false,"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.0.3/","native_build":false,"dependencies":[]},{"name":"path_provider_windows","path":"/Users/anthony/.pub-cache/hosted/pub.dev/path_provider_windows-2.1.6/","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.0.3/","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":"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-01-01 18:16:59.337550","version":"3.16.5"}
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-02-28 19:15:10.930011","version":"3.19.1"}

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## [3.9.2] - 2024-02-28
2+
3+
* Pubspec.yaml dependency updates.
4+
15
## [3.8.2] - 2024-01-01
26

37
* Update license date

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.8.2
18+
woosignal: ^3.9.2
1919
```
2020

2121
### Usage example #

lib/helpers/shared_pref.dart

Lines changed: 0 additions & 53 deletions
This file was deleted.

lib/networking/api_provider.dart

Lines changed: 36 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
1515

1616
import 'dart:convert';
17-
import 'package:device_info_plus/device_info_plus.dart';
17+
import 'package:device_meta/device_meta.dart';
1818
import 'package:dio/dio.dart';
19-
import 'package:woosignal/helpers/shared_pref.dart';
2019
import 'dart:io' show Platform;
20+
import 'package:flutter/foundation.dart' show kIsWeb;
2121

2222
class ApiProvider {
2323
late Dio _dio;
@@ -28,34 +28,46 @@ class ApiProvider {
2828

2929
/// Set the device meta
3030
Future<void> setDeviceMeta() async {
31-
DeviceInfoPlugin deviceInfo = DeviceInfoPlugin();
31+
DeviceMeta deviceMeta =
32+
await DeviceMeta.init(storageKey: "woosignal_woocommerce");
3233

33-
String? uuid = await getUUID();
34-
35-
if (Platform.isAndroid) {
36-
AndroidDeviceInfo androidDeviceInfo = await deviceInfo.androidInfo;
34+
if (kIsWeb) {
3735
_deviceMeta = {
38-
"model": androidDeviceInfo.device,
39-
"brand":
40-
androidDeviceInfo.brand.replaceAll(RegExp('[^\u0001-\u007F]'), '_'),
41-
"manufacturer": androidDeviceInfo.manufacturer,
42-
"version": androidDeviceInfo.version.sdkInt.toString(),
43-
"uuid": uuid,
44-
"platform_type": "android",
45-
"api_version": "$_version/v3"
36+
"model": 'X Model',
37+
"brand": 'X Brand',
38+
"manufacturer": "X Manufacturer",
39+
"version": 'X Version',
40+
"uuid": '1234567890',
41+
"platform_type": "web",
42+
"api_version": "$_version/v1",
43+
"sdk_name": "woosignal-woocommerce"
4644
};
47-
} else if (Platform.isIOS) {
48-
IosDeviceInfo iosDeviceInfo = await deviceInfo.iosInfo;
45+
return;
46+
}
47+
48+
if (Platform.environment.containsKey('FLUTTER_TEST')) {
4949
_deviceMeta = {
50-
"model": iosDeviceInfo.model,
51-
"brand": iosDeviceInfo.name.replaceAll(RegExp('[^\u0001-\u007F]'), '_'),
52-
"manufacturer": "Apple",
53-
"version": iosDeviceInfo.systemVersion,
54-
"uuid": uuid,
55-
"platform_type": "ios",
56-
"api_version": "$_version/v3"
50+
"model": 'X Model',
51+
"brand": 'X Brand',
52+
"manufacturer": "X Manufacturer",
53+
"version": 'X Version',
54+
"uuid": '1234567890',
55+
"platform_type": "testing",
56+
"api_version": "$_version/v1",
57+
"sdk_name": "woosignal-woocommerce"
5758
};
59+
return;
5860
}
61+
_deviceMeta = {
62+
"model": deviceMeta.model,
63+
"brand": deviceMeta.brand,
64+
"manufacturer": deviceMeta.manufacturer,
65+
"version": deviceMeta.version,
66+
"uuid": deviceMeta.uuid,
67+
"platform_type": deviceMeta.platformType,
68+
"api_version": "$_version/v1",
69+
"sdk_name": "woosignal-woocommerce"
70+
};
5971
}
6072

6173
/// set the FCM token

lib/woosignal.dart

Lines changed: 1 addition & 1 deletion
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.8.1";
60+
const String wooSignalVersion = "3.9.2";
6161

6262
class WooSignal {
6363
WooSignal._privateConstructor();

pubspec.yaml

Lines changed: 2 additions & 4 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.8.2
3+
version: 3.9.2
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,10 +11,8 @@ environment:
1111

1212
dependencies:
1313
dio: ^5.4.0
14-
device_info_plus: ^9.0.3
15-
shared_preferences: ^2.2.2
14+
device_meta: ^1.1.11
1615
encrypt: ^5.0.3
17-
uuid: ^4.1.0
1816

1917
flutter:
2018
sdk: flutter

0 commit comments

Comments
 (0)