-
Notifications
You must be signed in to change notification settings - Fork 188
Fix #92: rewrite samples using async await. #93
Conversation
Hello @kwalrath please let me know if I could make this better and thank you for considering my contribution. |
Hey, Damon, I'm the other Dart writer. THANKS for doing this! I'm sure we'll want an engineer to review, but we appreciate it! |
@@ -8,18 +8,19 @@ | |||
|
|||
import 'dart:io'; | |||
|
|||
void main() { | |||
void main() async { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should remove the "void", right?
I'm only partway through looking at this, but thanks very much @damondouglas! I looked up your CLA status and you've signed it, so that's good. |
Ah I'm doing for Streams now. Thank you. |
Great! I'll get back to reviewing this soon. |
OK, I'm back to this. While I get restarted, @damondouglas... Have you confirmed that these samples run? Have you run the formatter on them? Thanks! |
.then((Directory directory) { | ||
print(directory.path); | ||
}); | ||
var directory = await new Directory('dir/subdir'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be .create(recursive: true) so it'll create dir, as well as subdir?
I had a bunch of nitty little comments, but overall this looks great! |
Hello @kwalrath , thank you so much for your help and comments. I will address those straight away. |
Hello @kwalrath , Thank you for your patience! I scrubbed the code through |
Sorry, I dropped the ball on this one. Let me take another look. |
printResponseBody(response); | ||
client.close(); | ||
} catch (e) { | ||
client.close(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could use finally instead of duplicating client.close().
A couple of minor comments, but this is already so much better I'd accept it as-is if you don't have time right now to make more changes. |
Thank you, again. Pardon, we are moving today to Seattle so I won't be able
|
Good luck on the move! I'm going to accept this PR, and open a bug reminding us to consider the remaining comments. |
Fix #92: rewrite samples using async await.
No description provided.