Skip to content

Commit 0b2673a

Browse files
authored
Merge pull request #122 from lohanidamodar/fix-dart-sdk-exception
fix dart sdk exception missing await
2 parents 8a55e70 + 0c0f4cb commit 0b2673a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

templates/dart/.travis.yml.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ install:
1919
deploy:
2020
provider: script
2121
skip_cleanup: true
22-
script: pub publish -f
22+
script: dart format ./lib/ && pub publish -f
2323
on:
2424
tags: true

templates/dart/lib/client.dart.twig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,17 +80,17 @@ class Client {
8080
try {
8181

8282
if(headers['content-type'] == 'multipart/form-data') {
83-
return http.request(path, data: FormData.fromMap(params), options: options);
83+
return await http.request(path, data: FormData.fromMap(params), options: options);
8484
}
8585

8686
if (method == HttpMethod.get) {
8787
params.keys.forEach((key) {if (params[key] is int || params[key] is double) {
8888
params[key] = params[key].toString();
8989
}});
9090

91-
return http.get(path, queryParameters: params, options: options);
91+
return await http.get(path, queryParameters: params, options: options);
9292
} else {
93-
return http.request(path, data: params, options: options);
93+
return await http.request(path, data: params, options: options);
9494
}
9595
} on DioError catch(e) {
9696
if(e.response == null) {

0 commit comments

Comments
 (0)