[doc] Add an example.dart file (#64)
Pana suggests to add an example.dart file
here: https://pub.dev/packages/yaml#-analysis-tab-
Closes https://github.com/dart-lang/yaml/issues/45
diff --git a/example/example.dart b/example/example.dart
new file mode 100644
index 0000000..102d5b1
--- /dev/null
+++ b/example/example.dart
@@ -0,0 +1,10 @@
+// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:yaml/yaml.dart';
+
+void main() {
+ var doc = loadYaml("YAML: YAML Ain't Markup Language");
+ print(doc['YAML']);
+}