Add an example and fix example in readme
diff --git a/.travis.yml b/.travis.yml
index 2d9be65..616efcd 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,7 +1,7 @@
 language: dart
 
 dart:
-- 2.0.0
+- 2.1.0
 - dev
 
 dart_task:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 42b0565..30a8575 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,7 @@
 ## 0.1.2
 
 * Fix a number of lints affecting package maintenance score.
+* Update minimum Dart SDK to `2.1.0`.
 
 ## 0.1.1+3
 
diff --git a/README.md b/README.md
index d2914a8..e86dbe6 100644
--- a/README.md
+++ b/README.md
@@ -11,16 +11,19 @@
 import 'package:http/http.dart' as http;
 import 'package:http_retry/http_retry.dart';
 
-main() async {
-  var client = new RetryClient(new http.Client());
-  print(await client.read("http://example.org"));
-  await client.close();
+Future<void> main() async {
+  final client = RetryClient(http.Client());
+  try {
+    print(await client.read('http://example.org'));
+  } finally {
+    client.close();
+  }
 }
 ```
 
 By default, this retries any request whose response has status code 503
 Temporary Failure up to three retries. It waits 500ms before the first retry,
 and increases the delay by 1.5x each time. All of this can be customized using
-the [`new RetryClient()`][new RetryClient] constructor.
+the [`RetryClient()`][new RetryClient] constructor.
 
 [new RetryClient]: https://pub.dev/documentation/http_retry/latest/http_retry/RetryClient/RetryClient.html
diff --git a/example/example.dart b/example/example.dart
new file mode 100644
index 0000000..c024f93
--- /dev/null
+++ b/example/example.dart
@@ -0,0 +1,15 @@
+// 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:http/http.dart' as http;
+import 'package:http_retry/http_retry.dart';
+
+Future<void> main() async {
+  final client = RetryClient(http.Client());
+  try {
+    print(await client.read('http://example.org'));
+  } finally {
+    client.close();
+  }
+}
diff --git a/pubspec.yaml b/pubspec.yaml
index 6b536f4..0e6f907 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -5,7 +5,7 @@
 homepage: https://github.com/dart-lang/http_retry
 
 environment:
-  sdk: '>=2.0.0 <3.0.0'
+  sdk: '>=2.1.0 <3.0.0'
 
 dependencies:
   async: ^2.0.7