google / webcrypto.dart

Cross-platform implementation of Web Cryptography APIs
https://pub.dev/packages/webcrypto
Apache License 2.0
71 stars 43 forks source link

Make dartdoc examples self-contained. #101

Open sigurdm opened 1 month ago

sigurdm commented 1 month ago

The code in dartdoc examples mixes imports and statement-level code.

Ideally it would contain self-contained code that one could copy and run for one-self. And that we could extract programmatically and format, analyze etc.

jonasfj commented 1 month ago

Yeah, adding Future<void> main() async { around the actual statement-level code won't hurt readability.