Skip to content

Commit a607114

Browse files
committed
v3.0.2 - updates
1 parent dccd83a commit a607114

File tree

5 files changed

+10
-6
lines changed

5 files changed

+10
-6
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## [3.0.2] - 2021-12-19
2+
3+
* Update Readme
4+
15
## [3.0.1] - 2021-12-18
26

37
* Gracefully handle bad responses

README.md

Lines changed: 2 additions & 2 deletions
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.0.1
18+
woosignal: ^3.0.2
1919
```
2020

2121
### Usage example #
@@ -35,7 +35,7 @@ import 'package:woosignal/woosignal.dart';
3535
_getProducts() async {
3636
3737
// Step 1 - Initialize WooSignal
38-
WooSignal wooSignal = await WooSignal.instance.init(appKey: "your app key");
38+
await WooSignal.instance.init(appKey: "your app key");
3939
4040
// Step 2 - Call an API
4141
List<Product> products = await WooSignal.instance.getProducts();

example/lib/main.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ class _MyHomePageState extends State<MyHomePage> {
3131

3232
_incrementCounter() async {
3333
// CREATING AN INSTANCE FOR WOOSIGNAL
34-
WooSignal wooSignal = await WooSignal.instance.init(appKey: "your app key");
34+
await WooSignal.instance.init(appKey: "your app key");
3535

36-
List<Product> products = await wooSignal.getProducts();
36+
List<Product> products = await WooSignal.instance.getProducts();
3737
if (products.isNotEmpty) {
3838
_productName = products[0].name ?? "";
3939
}

lib/woosignal.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class WooSignal {
5959
bool? _debugMode;
6060

6161
/// Initialize the class
62-
Future init({required String? appKey, bool debugMode = false}) async {
62+
Future<void> init({required String? appKey, bool debugMode = false}) async {
6363
assert(appKey != null && appKey != "",
6464
"Provide a valid app key. Visit https://woosignal.com");
6565
_apiProvider = ApiProvider(appKey: appKey!, debugMode: debugMode);

pubspec.yaml

Lines changed: 1 addition & 1 deletion
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.0.1
3+
version: 3.0.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

0 commit comments

Comments
 (0)