Skip to content

Commit f7dd709

Browse files
committed
v3.2.0 updates
1 parent 4987249 commit f7dd709

File tree

4 files changed

+45
-34
lines changed

4 files changed

+45
-34
lines changed

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## [3.2.0] - 2022-07-07
1+
## [3.2.0] - 2022-07-08
22

33
* New API to delete an account
44
* Update code docs

example/main.dart

+6-6
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class _MyHomePageState extends State<MyHomePage> {
5050
String email = _tfEmailController.text;
5151
String password = _tfPasswordController.text;
5252

53-
late WPUserLoginResponse? wpUserLoginResponse;
53+
WPUserLoginResponse? wpUserLoginResponse;
5454
// LOGIN
5555
try {
5656
wpUserLoginResponse = await WPJsonAPI.instance.api((request) =>
@@ -61,18 +61,18 @@ class _MyHomePageState extends State<MyHomePage> {
6161
}
6262

6363
if (wpUserLoginResponse != null) {
64-
print(wpUserLoginResponse.data.userToken);
65-
print(wpUserLoginResponse.data.userId);
64+
print(wpUserLoginResponse.data?.userToken);
65+
print(wpUserLoginResponse.data?.userId);
6666

6767
// GET USER INFO
6868
WPUserInfoResponse? wpUserInfoResponse =
6969
await WPJsonAPI.instance.api((request) {
70-
return request.wpGetUserInfo(wpUserLoginResponse?.data.userToken);
70+
return request.wpGetUserInfo(wpUserLoginResponse!.data!.userToken!);
7171
});
7272

7373
if (wpUserInfoResponse != null) {
74-
print(wpUserInfoResponse.data.firstName);
75-
print(wpUserInfoResponse.data.lastName);
74+
print(wpUserInfoResponse.data?.firstName);
75+
print(wpUserInfoResponse.data?.lastName);
7676
} else {
7777
print("something went wrong");
7878
}

example/pubspec.lock

+35-27
Original file line numberDiff line numberDiff line change
@@ -7,42 +7,49 @@ packages:
77
name: async
88
url: "https://pub.dartlang.org"
99
source: hosted
10-
version: "2.4.1"
10+
version: "2.8.2"
1111
boolean_selector:
1212
dependency: transitive
1313
description:
1414
name: boolean_selector
1515
url: "https://pub.dartlang.org"
1616
source: hosted
17-
version: "2.0.0"
17+
version: "2.1.0"
18+
characters:
19+
dependency: transitive
20+
description:
21+
name: characters
22+
url: "https://pub.dartlang.org"
23+
source: hosted
24+
version: "1.2.0"
1825
charcode:
1926
dependency: transitive
2027
description:
2128
name: charcode
2229
url: "https://pub.dartlang.org"
2330
source: hosted
24-
version: "1.1.3"
31+
version: "1.3.1"
2532
clock:
2633
dependency: transitive
2734
description:
2835
name: clock
2936
url: "https://pub.dartlang.org"
3037
source: hosted
31-
version: "1.0.1"
38+
version: "1.1.0"
3239
collection:
3340
dependency: transitive
3441
description:
3542
name: collection
3643
url: "https://pub.dartlang.org"
3744
source: hosted
38-
version: "1.14.12"
45+
version: "1.16.0"
3946
fake_async:
4047
dependency: transitive
4148
description:
4249
name: fake_async
4350
url: "https://pub.dartlang.org"
4451
source: hosted
45-
version: "1.1.0"
52+
version: "1.3.0"
4653
flutter:
4754
dependency: "direct main"
4855
description: flutter
@@ -59,42 +66,42 @@ packages:
5966
name: http
6067
url: "https://pub.dartlang.org"
6168
source: hosted
62-
version: "0.12.1"
69+
version: "0.13.4"
6370
http_parser:
6471
dependency: transitive
6572
description:
6673
name: http_parser
6774
url: "https://pub.dartlang.org"
6875
source: hosted
69-
version: "3.1.3"
76+
version: "4.0.1"
7077
matcher:
7178
dependency: transitive
7279
description:
7380
name: matcher
7481
url: "https://pub.dartlang.org"
7582
source: hosted
76-
version: "0.12.6"
77-
meta:
83+
version: "0.12.11"
84+
material_color_utilities:
7885
dependency: transitive
7986
description:
80-
name: meta
87+
name: material_color_utilities
8188
url: "https://pub.dartlang.org"
8289
source: hosted
83-
version: "1.1.8"
84-
path:
90+
version: "0.1.4"
91+
meta:
8592
dependency: transitive
8693
description:
87-
name: path
94+
name: meta
8895
url: "https://pub.dartlang.org"
8996
source: hosted
9097
version: "1.7.0"
91-
pedantic:
98+
path:
9299
dependency: transitive
93100
description:
94-
name: pedantic
101+
name: path
95102
url: "https://pub.dartlang.org"
96103
source: hosted
97-
version: "1.8.0+1"
104+
version: "1.8.1"
98105
sky_engine:
99106
dependency: transitive
100107
description: flutter
@@ -106,62 +113,63 @@ packages:
106113
name: source_span
107114
url: "https://pub.dartlang.org"
108115
source: hosted
109-
version: "1.7.0"
116+
version: "1.8.2"
110117
stack_trace:
111118
dependency: transitive
112119
description:
113120
name: stack_trace
114121
url: "https://pub.dartlang.org"
115122
source: hosted
116-
version: "1.9.3"
123+
version: "1.10.0"
117124
stream_channel:
118125
dependency: transitive
119126
description:
120127
name: stream_channel
121128
url: "https://pub.dartlang.org"
122129
source: hosted
123-
version: "2.0.0"
130+
version: "2.1.0"
124131
string_scanner:
125132
dependency: transitive
126133
description:
127134
name: string_scanner
128135
url: "https://pub.dartlang.org"
129136
source: hosted
130-
version: "1.0.5"
137+
version: "1.1.0"
131138
term_glyph:
132139
dependency: transitive
133140
description:
134141
name: term_glyph
135142
url: "https://pub.dartlang.org"
136143
source: hosted
137-
version: "1.1.0"
144+
version: "1.2.0"
138145
test_api:
139146
dependency: transitive
140147
description:
141148
name: test_api
142149
url: "https://pub.dartlang.org"
143150
source: hosted
144-
version: "0.2.15"
151+
version: "0.4.9"
145152
typed_data:
146153
dependency: transitive
147154
description:
148155
name: typed_data
149156
url: "https://pub.dartlang.org"
150157
source: hosted
151-
version: "1.1.6"
158+
version: "1.3.1"
152159
vector_math:
153160
dependency: transitive
154161
description:
155162
name: vector_math
156163
url: "https://pub.dartlang.org"
157164
source: hosted
158-
version: "2.0.8"
165+
version: "2.1.2"
159166
wp_json_api:
160167
dependency: "direct dev"
161168
description:
162169
path: ".."
163170
relative: true
164171
source: path
165-
version: "0.1.4"
172+
version: "3.2.0"
166173
sdks:
167-
dart: ">=2.6.0 <3.0.0"
174+
dart: ">=2.17.0 <3.0.0"
175+
flutter: ">=1.17.0"

example/pubspec.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
name: woosignal_woocommerce_example
22
description: Demonstrates how to use the wp_json_api plugin.
33

4+
environment:
5+
sdk: '>=2.17.0 <3.0.0'
6+
47
dependencies:
58
flutter:
69
sdk: flutter

0 commit comments

Comments
 (0)