Skip to content

Commit

Permalink
v3.2.0 updates
Browse files Browse the repository at this point in the history
  • Loading branch information
agordn52 committed Jul 8, 2022
1 parent 4987249 commit f7dd709
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 34 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [3.2.0] - 2022-07-07
## [3.2.0] - 2022-07-08

* New API to delete an account
* Update code docs
Expand Down
12 changes: 6 additions & 6 deletions example/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class _MyHomePageState extends State<MyHomePage> {
String email = _tfEmailController.text;
String password = _tfPasswordController.text;

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

if (wpUserLoginResponse != null) {
print(wpUserLoginResponse.data.userToken);
print(wpUserLoginResponse.data.userId);
print(wpUserLoginResponse.data?.userToken);
print(wpUserLoginResponse.data?.userId);

// GET USER INFO
WPUserInfoResponse? wpUserInfoResponse =
await WPJsonAPI.instance.api((request) {
return request.wpGetUserInfo(wpUserLoginResponse?.data.userToken);
return request.wpGetUserInfo(wpUserLoginResponse!.data!.userToken!);
});

if (wpUserInfoResponse != null) {
print(wpUserInfoResponse.data.firstName);
print(wpUserInfoResponse.data.lastName);
print(wpUserInfoResponse.data?.firstName);
print(wpUserInfoResponse.data?.lastName);
} else {
print("something went wrong");
}
Expand Down
62 changes: 35 additions & 27 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,42 +7,49 @@ packages:
name: async
url: "https://pub.dartlang.org"
source: hosted
version: "2.4.1"
version: "2.8.2"
boolean_selector:
dependency: transitive
description:
name: boolean_selector
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
version: "2.1.0"
characters:
dependency: transitive
description:
name: characters
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0"
charcode:
dependency: transitive
description:
name: charcode
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.3"
version: "1.3.1"
clock:
dependency: transitive
description:
name: clock
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.1"
version: "1.1.0"
collection:
dependency: transitive
description:
name: collection
url: "https://pub.dartlang.org"
source: hosted
version: "1.14.12"
version: "1.16.0"
fake_async:
dependency: transitive
description:
name: fake_async
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
version: "1.3.0"
flutter:
dependency: "direct main"
description: flutter
Expand All @@ -59,42 +66,42 @@ packages:
name: http
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.1"
version: "0.13.4"
http_parser:
dependency: transitive
description:
name: http_parser
url: "https://pub.dartlang.org"
source: hosted
version: "3.1.3"
version: "4.0.1"
matcher:
dependency: transitive
description:
name: matcher
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.6"
meta:
version: "0.12.11"
material_color_utilities:
dependency: transitive
description:
name: meta
name: material_color_utilities
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.8"
path:
version: "0.1.4"
meta:
dependency: transitive
description:
name: path
name: meta
url: "https://pub.dartlang.org"
source: hosted
version: "1.7.0"
pedantic:
path:
dependency: transitive
description:
name: pedantic
name: path
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.0+1"
version: "1.8.1"
sky_engine:
dependency: transitive
description: flutter
Expand All @@ -106,62 +113,63 @@ packages:
name: source_span
url: "https://pub.dartlang.org"
source: hosted
version: "1.7.0"
version: "1.8.2"
stack_trace:
dependency: transitive
description:
name: stack_trace
url: "https://pub.dartlang.org"
source: hosted
version: "1.9.3"
version: "1.10.0"
stream_channel:
dependency: transitive
description:
name: stream_channel
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
version: "2.1.0"
string_scanner:
dependency: transitive
description:
name: string_scanner
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.5"
version: "1.1.0"
term_glyph:
dependency: transitive
description:
name: term_glyph
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
version: "1.2.0"
test_api:
dependency: transitive
description:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.15"
version: "0.4.9"
typed_data:
dependency: transitive
description:
name: typed_data
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.6"
version: "1.3.1"
vector_math:
dependency: transitive
description:
name: vector_math
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.8"
version: "2.1.2"
wp_json_api:
dependency: "direct dev"
description:
path: ".."
relative: true
source: path
version: "0.1.4"
version: "3.2.0"
sdks:
dart: ">=2.6.0 <3.0.0"
dart: ">=2.17.0 <3.0.0"
flutter: ">=1.17.0"
3 changes: 3 additions & 0 deletions example/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: woosignal_woocommerce_example
description: Demonstrates how to use the wp_json_api plugin.

environment:
sdk: '>=2.17.0 <3.0.0'

dependencies:
flutter:
sdk: flutter
Expand Down

0 comments on commit f7dd709

Please sign in to comment.