Make code in readme consistent with example (#49)
diff --git a/README.md b/README.md
index b7a49c3..e06e325 100644
--- a/README.md
+++ b/README.md
@@ -24,11 +24,11 @@
// [Scanner.lastMatch] holds the [MatchData] for the most recent call to
// [Scanner.scan], [Scanner.expect], or [Scanner.matches].
- var number = num.parse(scanner.lastMatch[0]);
+ var number = num.parse(scanner.lastMatch![0]!);
if (scanner.scan('.')) {
scanner.expect(RegExp(r'\d+'));
- final decimal = scanner.lastMatch[0];
+ final decimal = scanner.lastMatch![0]!;
number += int.parse(decimal) / math.pow(10, decimal.length);
}
diff --git a/example/example.dart b/example/example.dart
index fd36a73..ec9dd76 100644
--- a/example/example.dart
+++ b/example/example.dart
@@ -24,7 +24,7 @@
// [Scanner.lastMatch] holds the [MatchData] for the most recent call to
// [Scanner.scan], [Scanner.expect], or [Scanner.matches].
- var number = num.parse((scanner.lastMatch![0])!);
+ var number = num.parse(scanner.lastMatch![0]!);
if (scanner.scan('.')) {
scanner.expect(RegExp(r'\d+'));