fix a number of new pedantic lints (#13)

diff --git a/analysis_options.yaml b/analysis_options.yaml
index 642b1d5..f254d15 100644
--- a/analysis_options.yaml
+++ b/analysis_options.yaml
@@ -4,7 +4,6 @@
     implicit-casts: false
   errors:
     dead_code: error
-    override_on_non_overriding_method: error
     unused_element: error
     unused_import: error
     unused_local_variable: error
diff --git a/lib/src/list_range.dart b/lib/src/list_range.dart
index aef29ec..862c0d9 100644
--- a/lib/src/list_range.dart
+++ b/lib/src/list_range.dart
@@ -17,9 +17,9 @@
   final int _length;
 
   ListRange(List<int> source, [int offset = 0, int length])
-      : this._source = source,
-        this._offset = offset,
-        this._length = (length == null ? source.length - offset : length) {
+      : _source = source,
+        _offset = offset,
+        _length = (length ?? source.length - offset) {
     if (_offset < 0 || _offset > _source.length) {
       throw RangeError.value(_offset);
     }
@@ -31,9 +31,11 @@
     }
   }
 
+  @override
   ListRangeIterator get iterator =>
       _ListRangeIteratorImpl(_source, _offset, _offset + _length);
 
+  @override
   int get length => _length;
 }
 
@@ -41,7 +43,9 @@
 /// including the ability to get the current position, count remaining items,
 /// and move forward/backward within the iterator.
 abstract class ListRangeIterator implements Iterator<int> {
+  @override
   bool moveNext();
+  @override
   int get current;
   int get position;
   void backup([int by]);
@@ -57,18 +61,24 @@
   _ListRangeIteratorImpl(this._source, int offset, this._end)
       : _offset = offset - 1;
 
+  @override
   int get current => _source[_offset];
 
+  @override
   bool moveNext() => ++_offset < _end;
 
+  @override
   int get position => _offset;
 
+  @override
   void backup([int by = 1]) {
     _offset -= by;
   }
 
+  @override
   int get remaining => _end - _offset - 1;
 
+  @override
   void skip([int count = 1]) {
     _offset += count;
   }
diff --git a/lib/src/utf16.dart b/lib/src/utf16.dart
index 2bba5aa..c046430 100644
--- a/lib/src/utf16.dart
+++ b/lib/src/utf16.dart
@@ -4,7 +4,7 @@
 
 library utf.utf16;
 
-import "dart:collection";
+import 'dart:collection';
 
 import 'constants.dart';
 import 'list_range.dart';
@@ -77,9 +77,9 @@
     [int offset = 0,
     int length,
     int replacementCodepoint = UNICODE_REPLACEMENT_CHARACTER_CODEPOINT]) {
-  Utf16BytesToCodeUnitsDecoder decoder =
+  var decoder =
       Utf16BytesToCodeUnitsDecoder(bytes, offset, length, replacementCodepoint);
-  List<int> codeunits = decoder.decodeRest();
+  var codeunits = decoder.decodeRest();
   return String.fromCharCodes(
       utf16CodeUnitsToCodepoints(codeunits, 0, null, replacementCodepoint));
 }
@@ -94,7 +94,7 @@
     int length,
     bool stripBom = true,
     int replacementCodepoint = UNICODE_REPLACEMENT_CHARACTER_CODEPOINT]) {
-  List<int> codeunits = (Utf16beBytesToCodeUnitsDecoder(
+  var codeunits = (Utf16beBytesToCodeUnitsDecoder(
           bytes, offset, length, stripBom, replacementCodepoint))
       .decodeRest();
   return String.fromCharCodes(
@@ -111,7 +111,7 @@
     int length,
     bool stripBom = true,
     int replacementCodepoint = UNICODE_REPLACEMENT_CHARACTER_CODEPOINT]) {
-  List<int> codeunits = (Utf16leBytesToCodeUnitsDecoder(
+  var codeunits = (Utf16leBytesToCodeUnitsDecoder(
           bytes, offset, length, stripBom, replacementCodepoint))
       .decodeRest();
   return String.fromCharCodes(
@@ -125,15 +125,14 @@
 /// Produce a list of UTF-16BE encoded bytes. By default, this method produces
 /// UTF-16BE bytes with no BOM.
 List<int> encodeUtf16be(String str, [bool writeBOM = false]) {
-  List<int> utf16CodeUnits = _stringToUtf16CodeUnits(str);
-  List<int> encoding =
-      List<int>(2 * utf16CodeUnits.length + (writeBOM ? 2 : 0));
-  int i = 0;
+  var utf16CodeUnits = _stringToUtf16CodeUnits(str);
+  var encoding = List<int>(2 * utf16CodeUnits.length + (writeBOM ? 2 : 0));
+  var i = 0;
   if (writeBOM) {
     encoding[i++] = UNICODE_UTF_BOM_HI;
     encoding[i++] = UNICODE_UTF_BOM_LO;
   }
-  for (int unit in utf16CodeUnits) {
+  for (var unit in utf16CodeUnits) {
     encoding[i++] = (unit & UNICODE_BYTE_ONE_MASK) >> 8;
     encoding[i++] = unit & UNICODE_BYTE_ZERO_MASK;
   }
@@ -143,15 +142,14 @@
 /// Produce a list of UTF-16LE encoded bytes. By default, this method produces
 /// UTF-16LE bytes with no BOM.
 List<int> encodeUtf16le(String str, [bool writeBOM = false]) {
-  List<int> utf16CodeUnits = _stringToUtf16CodeUnits(str);
-  List<int> encoding =
-      List<int>(2 * utf16CodeUnits.length + (writeBOM ? 2 : 0));
-  int i = 0;
+  var utf16CodeUnits = _stringToUtf16CodeUnits(str);
+  var encoding = List<int>(2 * utf16CodeUnits.length + (writeBOM ? 2 : 0));
+  var i = 0;
   if (writeBOM) {
     encoding[i++] = UNICODE_UTF_BOM_LO;
     encoding[i++] = UNICODE_UTF_BOM_HI;
   }
-  for (int unit in utf16CodeUnits) {
+  for (var unit in utf16CodeUnits) {
     encoding[i++] = unit & UNICODE_BYTE_ZERO_MASK;
     encoding[i++] = (unit & UNICODE_BYTE_ONE_MASK) >> 8;
   }
@@ -168,7 +166,7 @@
 /// Identifies whether a List of bytes starts (based on offset) with a
 /// big-endian byte-order marker (BOM).
 bool hasUtf16beBom(List<int> utf16EncodedBytes, [int offset = 0, int length]) {
-  int end = length != null ? offset + length : utf16EncodedBytes.length;
+  var end = length != null ? offset + length : utf16EncodedBytes.length;
   return (offset + 2) <= end &&
       utf16EncodedBytes[offset] == UNICODE_UTF_BOM_HI &&
       utf16EncodedBytes[offset + 1] == UNICODE_UTF_BOM_LO;
@@ -177,7 +175,7 @@
 /// Identifies whether a List of bytes starts (based on offset) with a
 /// little-endian byte-order marker (BOM).
 bool hasUtf16leBom(List<int> utf16EncodedBytes, [int offset = 0, int length]) {
-  int end = length != null ? offset + length : utf16EncodedBytes.length;
+  var end = length != null ? offset + length : utf16EncodedBytes.length;
   return (offset + 2) <= end &&
       utf16EncodedBytes[offset] == UNICODE_UTF_BOM_LO &&
       utf16EncodedBytes[offset + 1] == UNICODE_UTF_BOM_HI;
@@ -187,7 +185,7 @@
   return codepointsToUtf16CodeUnits(str.codeUnits);
 }
 
-typedef ListRangeIterator _CodeUnitsProvider();
+typedef _CodeUnitsProvider = ListRangeIterator Function();
 
 /// Return type of [decodeUtf16AsIterable] and variants. The Iterable type
 /// provides an iterator on demand and the iterator will only translate bytes
@@ -200,6 +198,7 @@
 
   IterableUtf16Decoder._(this.codeunitsProvider, this.replacementCodepoint);
 
+  @override
   Utf16CodeUnitDecoder get iterator =>
       Utf16CodeUnitDecoder.fromListRangeIterator(
           codeunitsProvider(), replacementCodepoint);
@@ -221,9 +220,7 @@
       [int offset = 0,
       int length,
       int replacementCodepoint = UNICODE_REPLACEMENT_CHARACTER_CODEPOINT]) {
-    if (length == null) {
-      length = utf16EncodedBytes.length - offset;
-    }
+    length ??= utf16EncodedBytes.length - offset;
     if (hasUtf16beBom(utf16EncodedBytes, offset, length)) {
       return Utf16beBytesToCodeUnitsDecoder(utf16EncodedBytes, offset + 2,
           length - 2, false, replacementCodepoint);
@@ -240,25 +237,27 @@
   /// call. This method trades memory for improved speed in that it potentially
   /// over-allocates the List containing results.
   List<int> decodeRest() {
-    List<int> codeunits = List<int>(remaining);
-    int i = 0;
+    var codeunits = List<int>(remaining);
+    var i = 0;
     while (moveNext()) {
       codeunits[i++] = current;
     }
     if (i == codeunits.length) {
       return codeunits;
     } else {
-      List<int> truncCodeunits = List<int>(i);
+      var truncCodeunits = List<int>(i);
       truncCodeunits.setRange(0, i, codeunits);
       return truncCodeunits;
     }
   }
 
+  @override
   int get current => _current;
 
+  @override
   bool moveNext() {
     _current = null;
-    int remaining = utf16EncodedBytesIterator.remaining;
+    var remaining = utf16EncodedBytesIterator.remaining;
     if (remaining == 0) {
       _current = null;
       return false;
@@ -270,21 +269,25 @@
         return true;
       } else {
         throw ArgumentError(
-            "Invalid UTF16 at ${utf16EncodedBytesIterator.position}");
+            'Invalid UTF16 at ${utf16EncodedBytesIterator.position}');
       }
     }
     _current = decode();
     return true;
   }
 
+  @override
   int get position => utf16EncodedBytesIterator.position ~/ 2;
 
+  @override
   void backup([int by = 1]) {
     utf16EncodedBytesIterator.backup(2 * by);
   }
 
+  @override
   int get remaining => (utf16EncodedBytesIterator.remaining + 1) ~/ 2;
 
+  @override
   void skip([int count = 1]) {
     utf16EncodedBytesIterator.skip(2 * count);
   }
@@ -308,11 +311,12 @@
     }
   }
 
+  @override
   int decode() {
     utf16EncodedBytesIterator.moveNext();
-    int hi = utf16EncodedBytesIterator.current;
+    var hi = utf16EncodedBytesIterator.current;
     utf16EncodedBytesIterator.moveNext();
-    int lo = utf16EncodedBytesIterator.current;
+    var lo = utf16EncodedBytesIterator.current;
     return (hi << 8) + lo;
   }
 }
@@ -333,11 +337,12 @@
     }
   }
 
+  @override
   int decode() {
     utf16EncodedBytesIterator.moveNext();
-    int lo = utf16EncodedBytesIterator.current;
+    var lo = utf16EncodedBytesIterator.current;
     utf16EncodedBytesIterator.moveNext();
-    int hi = utf16EncodedBytesIterator.current;
+    var hi = utf16EncodedBytesIterator.current;
     return (hi << 8) + lo;
   }
 }
diff --git a/lib/src/utf32.dart b/lib/src/utf32.dart
index 5d0a1aa..08917db 100644
--- a/lib/src/utf32.dart
+++ b/lib/src/utf32.dart
@@ -4,7 +4,7 @@
 
 library utf.utf32;
 
-import "dart:collection";
+import 'dart:collection';
 
 import 'constants.dart';
 import 'list_range.dart';
@@ -100,17 +100,16 @@
 /// Produce a list of UTF-32BE encoded bytes. By default, this method produces
 /// UTF-32BE bytes with no BOM.
 List<int> encodeUtf32be(String str, [bool writeBOM = false]) {
-  List<int> utf32CodeUnits = stringToCodepoints(str);
-  List<int> encoding =
-      List<int>(4 * utf32CodeUnits.length + (writeBOM ? 4 : 0));
-  int i = 0;
+  var utf32CodeUnits = stringToCodepoints(str);
+  var encoding = List<int>(4 * utf32CodeUnits.length + (writeBOM ? 4 : 0));
+  var i = 0;
   if (writeBOM) {
     encoding[i++] = 0;
     encoding[i++] = 0;
     encoding[i++] = UNICODE_UTF_BOM_HI;
     encoding[i++] = UNICODE_UTF_BOM_LO;
   }
-  for (int unit in utf32CodeUnits) {
+  for (var unit in utf32CodeUnits) {
     encoding[i++] = (unit >> 24) & UNICODE_BYTE_ZERO_MASK;
     encoding[i++] = (unit >> 16) & UNICODE_BYTE_ZERO_MASK;
     encoding[i++] = (unit >> 8) & UNICODE_BYTE_ZERO_MASK;
@@ -122,17 +121,16 @@
 /// Produce a list of UTF-32LE encoded bytes. By default, this method produces
 /// UTF-32BE bytes with no BOM.
 List<int> encodeUtf32le(String str, [bool writeBOM = false]) {
-  List<int> utf32CodeUnits = stringToCodepoints(str);
-  List<int> encoding =
-      List<int>(4 * utf32CodeUnits.length + (writeBOM ? 4 : 0));
-  int i = 0;
+  var utf32CodeUnits = stringToCodepoints(str);
+  var encoding = List<int>(4 * utf32CodeUnits.length + (writeBOM ? 4 : 0));
+  var i = 0;
   if (writeBOM) {
     encoding[i++] = UNICODE_UTF_BOM_LO;
     encoding[i++] = UNICODE_UTF_BOM_HI;
     encoding[i++] = 0;
     encoding[i++] = 0;
   }
-  for (int unit in utf32CodeUnits) {
+  for (var unit in utf32CodeUnits) {
     encoding[i++] = unit & UNICODE_BYTE_ZERO_MASK;
     encoding[i++] = (unit >> 8) & UNICODE_BYTE_ZERO_MASK;
     encoding[i++] = (unit >> 16) & UNICODE_BYTE_ZERO_MASK;
@@ -151,7 +149,7 @@
 /// Identifies whether a List of bytes starts (based on offset) with a
 /// big-endian byte-order marker (BOM).
 bool hasUtf32beBom(List<int> utf32EncodedBytes, [int offset = 0, int length]) {
-  int end = length != null ? offset + length : utf32EncodedBytes.length;
+  var end = length != null ? offset + length : utf32EncodedBytes.length;
   return (offset + 4) <= end &&
       utf32EncodedBytes[offset] == 0 &&
       utf32EncodedBytes[offset + 1] == 0 &&
@@ -162,7 +160,7 @@
 /// Identifies whether a List of bytes starts (based on offset) with a
 /// little-endian byte-order marker (BOM).
 bool hasUtf32leBom(List<int> utf32EncodedBytes, [int offset = 0, int length]) {
-  int end = length != null ? offset + length : utf32EncodedBytes.length;
+  var end = length != null ? offset + length : utf32EncodedBytes.length;
   return (offset + 4) <= end &&
       utf32EncodedBytes[offset] == UNICODE_UTF_BOM_LO &&
       utf32EncodedBytes[offset + 1] == UNICODE_UTF_BOM_HI &&
@@ -170,7 +168,7 @@
       utf32EncodedBytes[offset + 3] == 0;
 }
 
-typedef Utf32BytesDecoder Utf32BytesDecoderProvider();
+typedef Utf32BytesDecoderProvider = Utf32BytesDecoder Function();
 
 /// Return type of [decodeUtf32AsIterable] and variants. The Iterable type
 /// provides an iterator on demand and the iterator will only translate bytes
@@ -182,6 +180,7 @@
 
   IterableUtf32Decoder._(this.codeunitsProvider);
 
+  @override
   Utf32BytesDecoder get iterator => codeunitsProvider();
 }
 
@@ -199,9 +198,7 @@
       [int offset = 0,
       int length,
       int replacementCodepoint = UNICODE_REPLACEMENT_CHARACTER_CODEPOINT]) {
-    if (length == null) {
-      length = utf32EncodedBytes.length - offset;
-    }
+    length ??= utf32EncodedBytes.length - offset;
     if (hasUtf32beBom(utf32EncodedBytes, offset, length)) {
       return Utf32beBytesDecoder(utf32EncodedBytes, offset + 4, length - 4,
           false, replacementCodepoint);
@@ -215,19 +212,21 @@
   }
 
   List<int> decodeRest() {
-    List<int> codeunits = List<int>(remaining);
-    int i = 0;
+    var codeunits = List<int>(remaining);
+    var i = 0;
     while (moveNext()) {
       codeunits[i++] = current;
     }
     return codeunits;
   }
 
+  @override
   int get current => _current;
 
+  @override
   bool moveNext() {
     _current = null;
-    int remaining = utf32EncodedBytesIterator.remaining;
+    var remaining = utf32EncodedBytesIterator.remaining;
     if (remaining == 0) {
       _current = null;
       return false;
@@ -239,10 +238,10 @@
         return true;
       } else {
         throw ArgumentError(
-            "Invalid UTF32 at ${utf32EncodedBytesIterator.position}");
+            'Invalid UTF32 at ${utf32EncodedBytesIterator.position}');
       }
     }
-    int codepoint = decode();
+    var codepoint = decode();
     if (_validCodepoint(codepoint)) {
       _current = codepoint;
       return true;
@@ -251,18 +250,22 @@
       return true;
     } else {
       throw ArgumentError(
-          "Invalid UTF32 at ${utf32EncodedBytesIterator.position}");
+          'Invalid UTF32 at ${utf32EncodedBytesIterator.position}');
     }
   }
 
+  @override
   int get position => utf32EncodedBytesIterator.position ~/ 4;
 
+  @override
   void backup([int by = 1]) {
     utf32EncodedBytesIterator.backup(4 * by);
   }
 
+  @override
   int get remaining => (utf32EncodedBytesIterator.remaining + 3) ~/ 4;
 
+  @override
   void skip([int count = 1]) {
     utf32EncodedBytesIterator.skip(4 * count);
   }
@@ -286,9 +289,10 @@
     }
   }
 
+  @override
   int decode() {
     utf32EncodedBytesIterator.moveNext();
-    int value = utf32EncodedBytesIterator.current;
+    var value = utf32EncodedBytesIterator.current;
     utf32EncodedBytesIterator.moveNext();
     value = (value << 8) + utf32EncodedBytesIterator.current;
     utf32EncodedBytesIterator.moveNext();
@@ -315,9 +319,10 @@
     }
   }
 
+  @override
   int decode() {
     utf32EncodedBytesIterator.moveNext();
-    int value = utf32EncodedBytesIterator.current;
+    var value = utf32EncodedBytesIterator.current;
     utf32EncodedBytesIterator.moveNext();
     value += (utf32EncodedBytesIterator.current << 8);
     utf32EncodedBytesIterator.moveNext();
diff --git a/lib/src/utf8.dart b/lib/src/utf8.dart
index d6b37d5..5cbc23c 100644
--- a/lib/src/utf8.dart
+++ b/lib/src/utf8.dart
@@ -4,7 +4,7 @@
 
 library utf.utf8;
 
-import "dart:collection";
+import 'dart:collection';
 
 import 'constants.dart';
 import 'list_range.dart';
@@ -67,10 +67,10 @@
 
 /// Encode code points as UTF-8 code units.
 List<int> codepointsToUtf8(List<int> codepoints, [int offset = 0, int length]) {
-  ListRange source = ListRange(codepoints, offset, length);
+  var source = ListRange(codepoints, offset, length);
 
-  int encodedLength = 0;
-  for (int value in source) {
+  var encodedLength = 0;
+  for (var value in source) {
     if (value < 0 || value > UNICODE_VALID_RANGE_MAX) {
       encodedLength += 3;
     } else if (value <= _UTF8_ONE_BYTE_MAX) {
@@ -84,9 +84,9 @@
     }
   }
 
-  List<int> encoded = List<int>(encodedLength);
-  int insertAt = 0;
-  for (int value in source) {
+  var encoded = List<int>(encodedLength);
+  var insertAt = 0;
+  for (var value in source) {
     if (value < 0 || value > UNICODE_VALID_RANGE_MAX) {
       encoded.setRange(insertAt, insertAt + 3, [0xef, 0xbf, 0xbd]);
       insertAt += 3;
@@ -131,6 +131,7 @@
 class IterableUtf8Decoder extends IterableBase<int> {
   final List<int> bytes;
   final int offset;
+  @override
   final int length;
   final int replacementCodepoint;
 
@@ -139,6 +140,7 @@
       this.length,
       this.replacementCodepoint = UNICODE_REPLACEMENT_CHARACTER_CODEPOINT]);
 
+  @override
   Utf8Decoder get iterator =>
       Utf8Decoder(bytes, offset, length, replacementCodepoint);
 }
@@ -169,29 +171,31 @@
   // Decode the remaininder of the characters in this decoder
   //into a [List<int>].
   List<int> decodeRest() {
-    List<int> codepoints = List<int>(utf8EncodedBytesIterator.remaining);
-    int i = 0;
+    var codepoints = List<int>(utf8EncodedBytesIterator.remaining);
+    var i = 0;
     while (moveNext()) {
       codepoints[i++] = current;
     }
     if (i == codepoints.length) {
       return codepoints;
     } else {
-      List<int> truncCodepoints = List<int>(i);
+      var truncCodepoints = List<int>(i);
       truncCodepoints.setRange(0, i, codepoints);
       return truncCodepoints;
     }
   }
 
+  @override
   int get current => _current;
 
+  @override
   bool moveNext() {
     _current = null;
 
     if (!utf8EncodedBytesIterator.moveNext()) return false;
 
-    int value = utf8EncodedBytesIterator.current;
-    int additionalBytes = 0;
+    var value = utf8EncodedBytesIterator.current;
+    var additionalBytes = 0;
 
     if (value < 0) {
       if (replacementCodepoint != null) {
@@ -199,7 +203,7 @@
         return true;
       } else {
         throw ArgumentError(
-            "Invalid UTF8 at ${utf8EncodedBytesIterator.position}");
+            'Invalid UTF8 at ${utf8EncodedBytesIterator.position}');
       }
     } else if (value <= _UTF8_ONE_BYTE_MAX) {
       _current = value;
@@ -210,7 +214,7 @@
         return true;
       } else {
         throw ArgumentError(
-            "Invalid UTF8 at ${utf8EncodedBytesIterator.position}");
+            'Invalid UTF8 at ${utf8EncodedBytesIterator.position}');
       }
     } else if (value < _UTF8_FIRST_BYTE_OF_THREE_BASE) {
       value -= _UTF8_FIRST_BYTE_OF_TWO_BASE;
@@ -232,11 +236,11 @@
       return true;
     } else {
       throw ArgumentError(
-          "Invalid UTF8 at ${utf8EncodedBytesIterator.position}");
+          'Invalid UTF8 at ${utf8EncodedBytesIterator.position}');
     }
-    int j = 0;
+    var j = 0;
     while (j < additionalBytes && utf8EncodedBytesIterator.moveNext()) {
-      int nextValue = utf8EncodedBytesIterator.current;
+      var nextValue = utf8EncodedBytesIterator.current;
       if (nextValue > _UTF8_ONE_BYTE_MAX &&
           nextValue < _UTF8_FIRST_BYTE_OF_TWO_BASE) {
         value = ((value << 6) | (nextValue & _UTF8_LO_SIX_BIT_MASK));
@@ -249,13 +253,13 @@
       }
       j++;
     }
-    bool validSequence = (j == additionalBytes &&
+    var validSequence = (j == additionalBytes &&
         (value < UNICODE_UTF16_RESERVED_LO ||
             value > UNICODE_UTF16_RESERVED_HI));
-    bool nonOverlong = (additionalBytes == 1 && value > _UTF8_ONE_BYTE_MAX) ||
+    var nonOverlong = (additionalBytes == 1 && value > _UTF8_ONE_BYTE_MAX) ||
         (additionalBytes == 2 && value > _UTF8_TWO_BYTE_MAX) ||
         (additionalBytes == 3 && value > _UTF8_THREE_BYTE_MAX);
-    bool inRange = value <= UNICODE_VALID_RANGE_MAX;
+    var inRange = value <= UNICODE_VALID_RANGE_MAX;
     if (validSequence && nonOverlong && inRange) {
       _current = value;
       return true;
@@ -264,7 +268,7 @@
       return true;
     } else {
       throw ArgumentError(
-          "Invalid UTF8 at ${utf8EncodedBytesIterator.position - j}");
+          'Invalid UTF8 at ${utf8EncodedBytesIterator.position - j}');
     }
   }
 }
diff --git a/lib/src/utf_16_code_unit_decoder.dart b/lib/src/utf_16_code_unit_decoder.dart
index 771baf8..38744f3 100644
--- a/lib/src/utf_16_code_unit_decoder.dart
+++ b/lib/src/utf_16_code_unit_decoder.dart
@@ -29,19 +29,21 @@
 
   Iterator<int> get iterator => this;
 
+  @override
   int get current => _current;
 
+  @override
   bool moveNext() {
     _current = null;
     if (!utf16CodeUnitIterator.moveNext()) return false;
 
-    int value = utf16CodeUnitIterator.current;
+    var value = utf16CodeUnitIterator.current;
     if (value < 0) {
       if (replacementCodepoint != null) {
         _current = replacementCodepoint;
       } else {
         throw ArgumentError(
-            "Invalid UTF16 at ${utf16CodeUnitIterator.position}");
+            'Invalid UTF16 at ${utf16CodeUnitIterator.position}');
       }
     } else if (value < UNICODE_UTF16_RESERVED_LO ||
         (value > UNICODE_UTF16_RESERVED_HI && value <= UNICODE_PLANE_ONE_MAX)) {
@@ -50,7 +52,7 @@
     } else if (value < UNICODE_UTF16_SURROGATE_UNIT_1_BASE &&
         utf16CodeUnitIterator.moveNext()) {
       // merge surrogate pair
-      int nextValue = utf16CodeUnitIterator.current;
+      var nextValue = utf16CodeUnitIterator.current;
       if (nextValue >= UNICODE_UTF16_SURROGATE_UNIT_1_BASE &&
           nextValue <= UNICODE_UTF16_RESERVED_HI) {
         value = (value - UNICODE_UTF16_SURROGATE_UNIT_0_BASE) << 10;
@@ -66,13 +68,13 @@
           _current = replacementCodepoint;
         } else {
           throw ArgumentError(
-              "Invalid UTF16 at ${utf16CodeUnitIterator.position}");
+              'Invalid UTF16 at ${utf16CodeUnitIterator.position}');
         }
       }
     } else if (replacementCodepoint != null) {
       _current = replacementCodepoint;
     } else {
-      throw ArgumentError("Invalid UTF16 at ${utf16CodeUnitIterator.position}");
+      throw ArgumentError('Invalid UTF16 at ${utf16CodeUnitIterator.position}');
     }
     return true;
   }
diff --git a/lib/src/utf_stream.dart b/lib/src/utf_stream.dart
index 1b4ca9b..85c0396 100644
--- a/lib/src/utf_stream.dart
+++ b/lib/src/utf_stream.dart
@@ -20,29 +20,31 @@
 
   _StringDecoder(this._replacementChar);
 
+  @override
   Stream<String> bind(Stream<List<int>> stream) {
     return Stream<String>.eventTransformed(stream, (EventSink<String> sink) {
       if (_outSink != null) {
-        throw StateError("String decoder already used");
+        throw StateError('String decoder already used');
       }
       _outSink = sink;
       return this;
     });
   }
 
+  @override
   void add(List<int> bytes) {
     try {
       _buffer = <int>[];
-      List<int> carry = _carry;
+      var carry = _carry;
       _carry = null;
-      int pos = 0;
-      int available = bytes.length;
+      var pos = 0;
+      var available = bytes.length;
       // If we have carry-over data, start from negative index, indicating carry
       // index.
-      int goodChars = 0;
+      var goodChars = 0;
       if (carry != null) pos = -carry.length;
       while (pos < available) {
-        int currentPos = pos;
+        var currentPos = pos;
         int getNext() {
           if (pos < 0) {
             return carry[pos++ + carry.length];
@@ -52,7 +54,7 @@
           return null;
         }
 
-        int consumed = _processBytes(getNext);
+        var consumed = _processBytes(getNext);
         if (consumed > 0) {
           goodChars = _buffer.length;
         } else if (consumed == 0) {
@@ -82,10 +84,12 @@
     }
   }
 
+  @override
   void addError(error, [StackTrace stackTrace]) {
     _outSink.addError(error, stackTrace);
   }
 
+  @override
   void close() {
     if (_carry != null) {
       if (_replacementChar != null) {
@@ -98,7 +102,7 @@
     _outSink.close();
   }
 
-  int _processBytes(int getNext());
+  int _processBytes(int Function() getNext);
 
   void _addChar(int char) {
     void error() {
@@ -122,8 +126,9 @@
       [int replacementChar = UNICODE_REPLACEMENT_CHARACTER_CODEPOINT])
       : super(replacementChar);
 
-  int _processBytes(int getNext()) {
-    int value = getNext();
+  @override
+  int _processBytes(int Function() getNext) {
+    var value = getNext();
     if ((value & 0xFF) != value) return -1; // Not a byte.
     if ((value & 0x80) == 0x80) {
       int additionalBytes;
@@ -156,8 +161,8 @@
       } else {
         return -1;
       }
-      for (int i = 0; i < additionalBytes; i++) {
-        int next = getNext();
+      for (var i = 0; i < additionalBytes; i++) {
+        var next = getNext();
         if (next == null) return 0; // Not enough chars, reset.
         if ((next & 0xc0) != 0x80 || (next & 0xff) != next) return -1;
         value = value << 6 | (next & 0x3f);
@@ -179,25 +184,29 @@
     implements EventSink<String> {
   EventSink<List<int>> _outSink;
 
+  @override
   Stream<List<int>> bind(Stream<String> stream) {
     return Stream<List<int>>.eventTransformed(stream,
         (EventSink<List<int>> sink) {
       if (_outSink != null) {
-        throw StateError("String encoder already used");
+        throw StateError('String encoder already used');
       }
       _outSink = sink;
       return this;
     });
   }
 
+  @override
   void add(String data) {
     _outSink.add(_processString(data));
   }
 
+  @override
   void addError(error, [StackTrace stackTrace]) {
     _outSink.addError(error, stackTrace);
   }
 
+  @override
   void close() {
     _outSink.close();
   }
@@ -207,13 +216,14 @@
 
 /// StringTransformer that UTF-8 encodes a stream of strings.
 class Utf8EncoderTransformer extends _StringEncoder {
+  @override
   List<int> _processString(String string) {
     var bytes = <int>[];
-    List<int> codepoints = utf16CodeUnitsToCodepoints(string.codeUnits);
-    int length = codepoints.length;
-    for (int i = 0; i < length; i++) {
+    var codepoints = utf16CodeUnitsToCodepoints(string.codeUnits);
+    var length = codepoints.length;
+    for (var i = 0; i < length; i++) {
       int additionalBytes;
-      int charCode = codepoints[i];
+      var charCode = codepoints[i];
       if (charCode <= 0x007F) {
         additionalBytes = 0;
         bytes.add(charCode);
@@ -230,7 +240,7 @@
         bytes.add(((charCode >> 18) & 0x07) | 0xF0);
         additionalBytes = 3;
       }
-      for (int i = additionalBytes; i > 0; i--) {
+      for (var i = additionalBytes; i > 0; i--) {
         // 10xxxxxx (xxxxxx is next 6 bits from the top).
         bytes.add(((charCode >> (6 * (i - 1))) & 0x3F) | 0x80);
       }
diff --git a/lib/src/util.dart b/lib/src/util.dart
index 135070c..3fc066a 100644
--- a/lib/src/util.dart
+++ b/lib/src/util.dart
@@ -13,19 +13,18 @@
     [int offset = 0,
     int length,
     int replacementCodepoint = UNICODE_REPLACEMENT_CHARACTER_CODEPOINT]) {
-  ListRangeIterator source =
-      (ListRange(utf16CodeUnits, offset, length)).iterator;
-  Utf16CodeUnitDecoder decoder =
+  var source = (ListRange(utf16CodeUnits, offset, length)).iterator;
+  var decoder =
       Utf16CodeUnitDecoder.fromListRangeIterator(source, replacementCodepoint);
-  List<int> codepoints = List<int>(source.remaining);
-  int i = 0;
+  var codepoints = List<int>(source.remaining);
+  var i = 0;
   while (decoder.moveNext()) {
     codepoints[i++] = decoder.current;
   }
   if (i == codepoints.length) {
     return codepoints;
   } else {
-    List<int> codepointTrunc = List<int>(i);
+    var codepointTrunc = List<int>(i);
     codepointTrunc.setRange(0, i, codepoints);
     return codepointTrunc;
   }
@@ -36,9 +35,9 @@
     [int offset = 0,
     int length,
     int replacementCodepoint = UNICODE_REPLACEMENT_CHARACTER_CODEPOINT]) {
-  ListRange listRange = ListRange(codepoints, offset, length);
-  int encodedLength = 0;
-  for (int value in listRange) {
+  var listRange = ListRange(codepoints, offset, length);
+  var encodedLength = 0;
+  for (var value in listRange) {
     if ((value >= 0 && value < UNICODE_UTF16_RESERVED_LO) ||
         (value > UNICODE_UTF16_RESERVED_HI && value <= UNICODE_PLANE_ONE_MAX)) {
       encodedLength++;
@@ -50,15 +49,15 @@
     }
   }
 
-  List<int> codeUnitsBuffer = List<int>(encodedLength);
-  int j = 0;
-  for (int value in listRange) {
+  var codeUnitsBuffer = List<int>(encodedLength);
+  var j = 0;
+  for (var value in listRange) {
     if ((value >= 0 && value < UNICODE_UTF16_RESERVED_LO) ||
         (value > UNICODE_UTF16_RESERVED_HI && value <= UNICODE_PLANE_ONE_MAX)) {
       codeUnitsBuffer[j++] = value;
     } else if (value > UNICODE_PLANE_ONE_MAX &&
         value <= UNICODE_VALID_RANGE_MAX) {
-      int base = value - UNICODE_UTF16_OFFSET;
+      var base = value - UNICODE_UTF16_OFFSET;
       codeUnitsBuffer[j++] = UNICODE_UTF16_SURROGATE_UNIT_0_BASE +
           ((base & UNICODE_UTF16_HI_MASK) >> 10);
       codeUnitsBuffer[j++] =
@@ -66,7 +65,7 @@
     } else if (replacementCodepoint != null) {
       codeUnitsBuffer[j++] = replacementCodepoint;
     } else {
-      throw ArgumentError("Invalid encoding");
+      throw ArgumentError('Invalid encoding');
     }
   }
   return codeUnitsBuffer;
diff --git a/test/unicode_core_test.dart b/test/unicode_core_test.dart
index c23665f..08db56d 100755
--- a/test/unicode_core_test.dart
+++ b/test/unicode_core_test.dart
@@ -17,71 +17,71 @@
 
 void testCodepointsToUtf16CodeUnits() {
   // boundary conditions
-  expect.listEquals([], codepointsToUtf16CodeUnits([]), "no input");
-  expect.listEquals([0x0], codepointsToUtf16CodeUnits([0x0]), "0");
+  expect.listEquals([], codepointsToUtf16CodeUnits([]), 'no input');
+  expect.listEquals([0x0], codepointsToUtf16CodeUnits([0x0]), '0');
   expect.listEquals(
-      [0xd800, 0xdc00], codepointsToUtf16CodeUnits([0x10000]), "10000");
+      [0xd800, 0xdc00], codepointsToUtf16CodeUnits([0x10000]), '10000');
 
-  expect.listEquals([0xffff], codepointsToUtf16CodeUnits([0xffff]), "ffff");
+  expect.listEquals([0xffff], codepointsToUtf16CodeUnits([0xffff]), 'ffff');
   expect.listEquals(
-      [0xdbff, 0xdfff], codepointsToUtf16CodeUnits([0x10ffff]), "10ffff");
+      [0xdbff, 0xdfff], codepointsToUtf16CodeUnits([0x10ffff]), '10ffff');
 
-  expect.listEquals([0xd7ff], codepointsToUtf16CodeUnits([0xd7ff]), "d7ff");
-  expect.listEquals([0xe000], codepointsToUtf16CodeUnits([0xe000]), "e000");
+  expect.listEquals([0xd7ff], codepointsToUtf16CodeUnits([0xd7ff]), 'd7ff');
+  expect.listEquals([0xe000], codepointsToUtf16CodeUnits([0xe000]), 'e000');
 
   expect.listEquals([UNICODE_REPLACEMENT_CHARACTER_CODEPOINT],
-      codepointsToUtf16CodeUnits([0xd800]), "d800");
+      codepointsToUtf16CodeUnits([0xd800]), 'd800');
   expect.listEquals([UNICODE_REPLACEMENT_CHARACTER_CODEPOINT],
-      codepointsToUtf16CodeUnits([0xdfff]), "dfff");
+      codepointsToUtf16CodeUnits([0xdfff]), 'dfff');
 }
 
 void testUtf16bytesToCodepoints() {
   // boundary conditions: First possible values
-  expect.listEquals([], utf16CodeUnitsToCodepoints([]), "no input");
-  expect.listEquals([0x0], utf16CodeUnitsToCodepoints([0x0]), "0");
+  expect.listEquals([], utf16CodeUnitsToCodepoints([]), 'no input');
+  expect.listEquals([0x0], utf16CodeUnitsToCodepoints([0x0]), '0');
   expect.listEquals(
-      [0x10000], utf16CodeUnitsToCodepoints([0xd800, 0xdc00]), "10000");
+      [0x10000], utf16CodeUnitsToCodepoints([0xd800, 0xdc00]), '10000');
 
   // boundary conditions: Last possible sequence of a certain length
-  expect.listEquals([0xffff], utf16CodeUnitsToCodepoints([0xffff]), "ffff");
+  expect.listEquals([0xffff], utf16CodeUnitsToCodepoints([0xffff]), 'ffff');
   expect.listEquals(
-      [0x10ffff], utf16CodeUnitsToCodepoints([0xdbff, 0xdfff]), "10ffff");
+      [0x10ffff], utf16CodeUnitsToCodepoints([0xdbff, 0xdfff]), '10ffff');
 
   // other boundary conditions
-  expect.listEquals([0xd7ff], utf16CodeUnitsToCodepoints([0xd7ff]), "d7ff");
-  expect.listEquals([0xe000], utf16CodeUnitsToCodepoints([0xe000]), "e000");
+  expect.listEquals([0xd7ff], utf16CodeUnitsToCodepoints([0xd7ff]), 'd7ff');
+  expect.listEquals([0xe000], utf16CodeUnitsToCodepoints([0xe000]), 'e000');
 
   // unexpected continuation bytes
   expect.listEquals([0xfffd], utf16CodeUnitsToCodepoints([0xdc00]),
-      "dc00 first unexpected continuation byte");
+      'dc00 first unexpected continuation byte');
   expect.listEquals([0xfffd], utf16CodeUnitsToCodepoints([0xdfff]),
-      "dfff last unexpected continuation byte");
+      'dfff last unexpected continuation byte');
   expect.listEquals([0xfffd], utf16CodeUnitsToCodepoints([0xdc00]),
-      "1 unexpected continuation bytes");
+      '1 unexpected continuation bytes');
   expect.listEquals(
       [0xfffd, 0xfffd],
       utf16CodeUnitsToCodepoints([0xdc00, 0xdc00]),
-      "2 unexpected continuation bytes");
+      '2 unexpected continuation bytes');
   expect.listEquals(
       [0xfffd, 0xfffd, 0xfffd],
       utf16CodeUnitsToCodepoints([0xdc00, 0xdc00, 0xdc00]),
-      "3 unexpected continuation bytes");
+      '3 unexpected continuation bytes');
 
   // incomplete sequences
   expect.listEquals(
-      [0xfffd], utf16CodeUnitsToCodepoints([0xd800]), "d800 last byte missing");
+      [0xfffd], utf16CodeUnitsToCodepoints([0xd800]), 'd800 last byte missing');
   expect.listEquals(
-      [0xfffd], utf16CodeUnitsToCodepoints([0xdbff]), "dbff last byte missing");
+      [0xfffd], utf16CodeUnitsToCodepoints([0xdbff]), 'dbff last byte missing');
 
   // concatenation of incomplete sequences
   expect.listEquals(
       [0xfffd, 0xfffd],
       utf16CodeUnitsToCodepoints([0xd800, 0xdbff]),
-      "d800 dbff last byte missing");
+      'd800 dbff last byte missing');
 
   // impossible bytes
   expect.listEquals(
-      [0xfffd], utf16CodeUnitsToCodepoints([0x110000]), "110000 out of bounds");
+      [0xfffd], utf16CodeUnitsToCodepoints([0x110000]), '110000 out of bounds');
 
   // overlong sequences not possible in utf16 (nothing < x10000)
   // illegal code positions d800-dfff not encodable (< x10000)
diff --git a/test/utf16_test.dart b/test/utf16_test.dart
index 7d61d21..255c32f 100755
--- a/test/utf16_test.dart
+++ b/test/utf16_test.dart
@@ -9,14 +9,14 @@
 
 import 'expect.dart' as expect;
 
-const String testKoreanCharSubset = """
+const String testKoreanCharSubset = '''
 가각갂갃간갅갆갇갈갉갊갋갌갍갎갏감갑값갓갔강갖갗갘같갚갛
 개객갞갟갠갡갢갣갤갥갦갧갨갩갪갫갬갭갮갯갰갱갲갳갴갵갶갷
-갸갹갺갻갼갽갾갿걀걁걂걃걄걅걆걇걈걉걊걋걌걍걎걏걐걑걒걓""";
+갸갹갺갻갼갽갾갿걀걁걂걃걄걅걆걇걈걉걊걋걌걍걎걏걐걑걒걓''';
 
-const String testHanWater = "水";
+const String testHanWater = '水';
 
-const List<int> testKoreanCharSubsetUtf16beBom = <int>[
+const testKoreanCharSubsetUtf16beBom = <int>[
   0xfe, 0xff, 0xac, 0x00, 0xac, 0x01, 0xac, 0x02, // 8
   0xac, 0x03, 0xac, 0x04, 0xac, 0x05, 0xac, 0x06,
   0xac, 0x07, 0xac, 0x08, 0xac, 0x09, 0xac, 0x0a,
@@ -41,7 +41,7 @@
   0xac, 0x51, 0xac, 0x52, 0xac, 0x53
 ];
 
-const List<int> testKoreanCharSubsetUtf16le = <int>[
+const testKoreanCharSubsetUtf16le = <int>[
   0x00, 0xac, 0x01, 0xac, 0x02, 0xac, 0x03, 0xac, // 8
   0x04, 0xac, 0x05, 0xac, 0x06, 0xac, 0x07, 0xac,
   0x08, 0xac, 0x09, 0xac, 0x0a, 0xac, 0x0b, 0xac,
@@ -74,43 +74,42 @@
 
 void testEncodeToUtf16() {
   expect.listEquals(
-      [], encodeUtf16be("")); // TODO(dcarlson) should we skip bom if empty?
+      [], encodeUtf16be('')); // TODO(dcarlson) should we skip bom if empty?
   expect.listEquals(testKoreanCharSubsetUtf16beBom,
-      encodeUtf16(testKoreanCharSubset), "encode UTF-16(BE by default) Korean");
+      encodeUtf16(testKoreanCharSubset), 'encode UTF-16(BE by default) Korean');
 
   expect.listEquals(testKoreanCharSubsetUtf16le,
-      encodeUtf16le(testKoreanCharSubset), "encode UTF-16LE Korean");
+      encodeUtf16le(testKoreanCharSubset), 'encode UTF-16LE Korean');
 }
 
 void testUtf16BytesToString() {
-  expect.stringEquals("", decodeUtf16([]));
+  expect.stringEquals('', decodeUtf16([]));
   expect.stringEquals(
-      testHanWater, decodeUtf16([0x6C, 0x34]), "Water variation 1");
+      testHanWater, decodeUtf16([0x6C, 0x34]), 'Water variation 1');
   expect.stringEquals(
-      testHanWater, decodeUtf16([0xFE, 0xFF, 0x6C, 0x34]), "Water variation 2");
+      testHanWater, decodeUtf16([0xFE, 0xFF, 0x6C, 0x34]), 'Water variation 2');
   expect.stringEquals(
-      testHanWater, decodeUtf16([0xFF, 0xFE, 0x34, 0x6C]), "Water variation 3");
+      testHanWater, decodeUtf16([0xFF, 0xFE, 0x34, 0x6C]), 'Water variation 3');
 
   expect.stringEquals(
-      testHanWater, decodeUtf16be([0x6C, 0x34]), "Water variation 4");
+      testHanWater, decodeUtf16be([0x6C, 0x34]), 'Water variation 4');
   expect.stringEquals(testHanWater, decodeUtf16be([0xFE, 0xFF, 0x6C, 0x34]),
-      "Water variation 5");
+      'Water variation 5');
 
   expect.stringEquals(
-      testHanWater, decodeUtf16le([0x34, 0x6C]), "Water variation 6");
+      testHanWater, decodeUtf16le([0x34, 0x6C]), 'Water variation 6');
   expect.stringEquals(testHanWater, decodeUtf16le([0xFF, 0xFE, 0x34, 0x6C]),
-      "Water variation 7");
+      'Water variation 7');
 
   expect.stringEquals(testKoreanCharSubset,
-      decodeUtf16(testKoreanCharSubsetUtf16beBom), "UTF-16BE Korean");
+      decodeUtf16(testKoreanCharSubsetUtf16beBom), 'UTF-16BE Korean');
 }
 
 void testIterableMethods() {
   // empty input
   expect.isFalse(decodeUtf16AsIterable([]).iterator.moveNext());
 
-  IterableUtf16Decoder koreanDecoder =
-      decodeUtf16AsIterable(testKoreanCharSubsetUtf16beBom);
+  var koreanDecoder = decodeUtf16AsIterable(testKoreanCharSubsetUtf16beBom);
   // get the first character
   expect.equals(testKoreanCharSubset.codeUnits[0], koreanDecoder.first);
   // get the whole translation using the Iterable interface
@@ -126,7 +125,7 @@
       44032,
       (List<int>.from(
           decodeUtf16leAsIterable(testKoreanCharSubsetUtf16le)))[0]);
-  bool stripBom = false;
+  var stripBom = false;
   expect.equals(
       UNICODE_BOM,
       (List<int>.from(decodeUtf16beAsIterable(
diff --git a/test/utf32_test.dart b/test/utf32_test.dart
index 47bc393..d010da6 100755
--- a/test/utf32_test.dart
+++ b/test/utf32_test.dart
@@ -9,14 +9,14 @@
 
 import 'expect.dart' as expect;
 
-const String testKoreanCharSubset = """
+const String testKoreanCharSubset = '''
 가각갂갃간갅갆갇갈갉갊갋갌갍갎갏감갑값갓갔강갖갗갘같갚갛
 개객갞갟갠갡갢갣갤갥갦갧갨갩갪갫갬갭갮갯갰갱갲갳갴갵갶갷
-갸갹갺갻갼갽갾갿걀걁걂걃걄걅걆걇걈걉걊걋걌걍걎걏걐걑걒걓""";
+갸갹갺갻갼갽갾갿걀걁걂걃걄걅걆걇걈걉걊걋걌걍걎걏걐걑걒걓''';
 
-const String testHanTwice = "二";
+const String testHanTwice = '二';
 
-const List<int> testKoreanCharSubsetUtf32beBom = <int>[
+const testKoreanCharSubsetUtf32beBom = <int>[
   0x00, 0x00, 0xfe, 0xff, 0x00, 0x00, 0xac, 0x00, // 8
   0x00, 0x00, 0xac, 0x01, 0x00, 0x00, 0xac, 0x02,
   0x00, 0x00, 0xac, 0x03, 0x00, 0x00, 0xac, 0x04,
@@ -63,7 +63,7 @@
   0x00, 0x00, 0xac, 0x53
 ];
 
-const List<int> testKoreanCharSubsetUtf32le = <int>[
+const testKoreanCharSubsetUtf32le = <int>[
   0x00, 0xac, 0x00, 0x00, 0x01, 0xac, 0x00, 0x00, // 8
   0x02, 0xac, 0x00, 0x00, 0x03, 0xac, 0x00, 0x00,
   0x04, 0xac, 0x00, 0x00, 0x05, 0xac, 0x00, 0x00,
@@ -117,49 +117,48 @@
 
 void testEncodeToUtf32() {
   expect.listEquals(
-      [], encodeUtf32le(""), "no input"); // TODO(dcarlson) skip bom on empty?
+      [], encodeUtf32le(''), 'no input'); // TODO(dcarlson) skip bom on empty?
   expect.listEquals(testKoreanCharSubsetUtf32beBom,
-      encodeUtf32(testKoreanCharSubset), "encode UTF-32(BE by default) Korean");
+      encodeUtf32(testKoreanCharSubset), 'encode UTF-32(BE by default) Korean');
   expect.listEquals(
       testKoreanCharSubsetUtf32le,
       encodeUtf32le(testKoreanCharSubset),
-      "encode UTF-32(LE by default) Korean");
+      'encode UTF-32(LE by default) Korean');
 }
 
 void testUtf32BytesToString() {
-  expect.stringEquals("", decodeUtf32([]), "no input");
-  expect.stringEquals("\ufffd", decodeUtf32([0]), "single byte");
-  expect.stringEquals("\ufffd", decodeUtf32([0, 0, 0x4e]), "short a byte");
+  expect.stringEquals('', decodeUtf32([]), 'no input');
+  expect.stringEquals('\ufffd', decodeUtf32([0]), 'single byte');
+  expect.stringEquals('\ufffd', decodeUtf32([0, 0, 0x4e]), 'short a byte');
   expect.stringEquals(
-      "\u4e8c\ufffd", decodeUtf32([0, 0, 0x4e, 0x8c, 0]), "extra byte");
+      '\u4e8c\ufffd', decodeUtf32([0, 0, 0x4e, 0x8c, 0]), 'extra byte');
 
   expect.stringEquals(
-      testHanTwice, decodeUtf32([0, 0, 0x4e, 0x8c]), "twice variation 1");
+      testHanTwice, decodeUtf32([0, 0, 0x4e, 0x8c]), 'twice variation 1');
   expect.stringEquals(testHanTwice,
-      decodeUtf32([0, 0, 0xfe, 0xff, 0, 0, 0x4e, 0x8c]), "twice variation 2");
+      decodeUtf32([0, 0, 0xfe, 0xff, 0, 0, 0x4e, 0x8c]), 'twice variation 2');
   expect.stringEquals(testHanTwice,
-      decodeUtf32([0xff, 0xfe, 0, 0, 0x8c, 0x4e, 0, 0]), "twice variation 3");
+      decodeUtf32([0xff, 0xfe, 0, 0, 0x8c, 0x4e, 0, 0]), 'twice variation 3');
 
   expect.stringEquals(
-      testHanTwice, decodeUtf32be([0, 0, 0x4e, 0x8c]), "twice variation 4");
+      testHanTwice, decodeUtf32be([0, 0, 0x4e, 0x8c]), 'twice variation 4');
   expect.stringEquals(testHanTwice,
-      decodeUtf32be([0, 0, 0xfe, 0xff, 0, 0, 0x4e, 0x8c]), "twice variation 5");
+      decodeUtf32be([0, 0, 0xfe, 0xff, 0, 0, 0x4e, 0x8c]), 'twice variation 5');
 
   expect.stringEquals(
-      testHanTwice, decodeUtf32le([0x8c, 0x4e, 0, 0]), "twice variation 6");
+      testHanTwice, decodeUtf32le([0x8c, 0x4e, 0, 0]), 'twice variation 6');
   expect.stringEquals(testHanTwice,
-      decodeUtf32le([0xff, 0xfe, 0, 0, 0x8c, 0x4e, 0, 0]), "twice variation 7");
+      decodeUtf32le([0xff, 0xfe, 0, 0, 0x8c, 0x4e, 0, 0]), 'twice variation 7');
 
   expect.stringEquals(testKoreanCharSubset,
-      decodeUtf32(testKoreanCharSubsetUtf32beBom), "UTF-32BE Korean");
+      decodeUtf32(testKoreanCharSubsetUtf32beBom), 'UTF-32BE Korean');
 }
 
 void testIterableMethods() {
   // empty input
   expect.isFalse(decodeUtf32AsIterable([]).iterator.moveNext());
 
-  IterableUtf32Decoder koreanDecoder =
-      decodeUtf32AsIterable(testKoreanCharSubsetUtf32beBom);
+  var koreanDecoder = decodeUtf32AsIterable(testKoreanCharSubsetUtf32beBom);
   // get the first character
   expect.equals(testKoreanCharSubset.codeUnits[0], koreanDecoder.first);
   // get the whole translation using the Iterable interface
@@ -175,7 +174,7 @@
       44032,
       (List<int>.from(
           decodeUtf32leAsIterable(testKoreanCharSubsetUtf32le)))[0]);
-  bool stripBom = false;
+  var stripBom = false;
   expect.equals(
       UNICODE_BOM,
       (List<int>.from(decodeUtf32beAsIterable(
diff --git a/test/utf82_test.dart b/test/utf82_test.dart
index 378ea15..61e6bdf 100755
--- a/test/utf82_test.dart
+++ b/test/utf82_test.dart
@@ -9,9 +9,9 @@
 
 import 'expect.dart' as expect;
 
-const String testEnglishPhrase = "The quick brown fox jumps over the lazy dog.";
+const String testEnglishPhrase = 'The quick brown fox jumps over the lazy dog.';
 
-const List<int> testEnglishUtf8 = <int>[
+const testEnglishUtf8 = <int>[
   0x54, 0x68, 0x65, 0x20, 0x71, 0x75, 0x69, 0x63, // 8
   0x6b, 0x20, 0x62, 0x72, 0x6f, 0x77, 0x6e, 0x20,
   0x66, 0x6f, 0x78, 0x20, 0x6a, 0x75, 0x6d, 0x70,
@@ -20,10 +20,10 @@
   0x64, 0x6f, 0x67, 0x2e
 ];
 
-const String testDanishPhrase = "Quizdeltagerne spiste jordbær med "
-    "fløde mens cirkusklovnen Wolther spillede på xylofon.";
+const String testDanishPhrase = 'Quizdeltagerne spiste jordbær med '
+    'fløde mens cirkusklovnen Wolther spillede på xylofon.';
 
-const List<int> testDanishUtf8 = <int>[
+const testDanishUtf8 = <int>[
   0x51, 0x75, 0x69, 0x7a, 0x64, 0x65, 0x6c, 0x74, // 8
   0x61, 0x67, 0x65, 0x72, 0x6e, 0x65, 0x20, 0x73,
   0x70, 0x69, 0x73, 0x74, 0x65, 0x20, 0x6a, 0x6f,
@@ -40,9 +40,9 @@
 
 // unusual formatting due to strange editor interaction w/ text direction.
 const String testHebrewPhrase =
-    "דג סקרן שט בים מאוכזב ולפתע מצא לו חברה איך הקליטה";
+    'דג סקרן שט בים מאוכזב ולפתע מצא לו חברה איך הקליטה';
 
-const List<int> testHebrewUtf8 = <int>[
+const testHebrewUtf8 = <int>[
   0xd7, 0x93, 0xd7, 0x92, 0x20, 0xd7, 0xa1, 0xd7, // 8
   0xa7, 0xd7, 0xa8, 0xd7, 0x9f, 0x20, 0xd7, 0xa9,
   0xd7, 0x98, 0x20, 0xd7, 0x91, 0xd7, 0x99, 0xd7,
@@ -57,10 +57,10 @@
   0xd7, 0x94
 ];
 
-const String testRussianPhrase = "Съешь же ещё этих мягких "
-    "французских булок да выпей чаю";
+const String testRussianPhrase = 'Съешь же ещё этих мягких '
+    'французских булок да выпей чаю';
 
-const List<int> testRussianUtf8 = <int>[
+const testRussianUtf8 = <int>[
   0xd0, 0xa1, 0xd1, 0x8a, 0xd0, 0xb5, 0xd1, 0x88, // 8
   0xd1, 0x8c, 0x20, 0xd0, 0xb6, 0xd0, 0xb5, 0x20,
   0xd0, 0xb5, 0xd1, 0x89, 0xd1, 0x91, 0x20, 0xd1,
@@ -76,10 +76,10 @@
   0x87, 0xd0, 0xb0, 0xd1, 0x8e
 ];
 
-const String testGreekPhrase = "Γαζέες καὶ μυρτιὲς δὲν θὰ βρῶ πιὰ "
-    "στὸ χρυσαφὶ ξέφωτο";
+const String testGreekPhrase = 'Γαζέες καὶ μυρτιὲς δὲν θὰ βρῶ πιὰ '
+    'στὸ χρυσαφὶ ξέφωτο';
 
-const List<int> testGreekUtf8 = <int>[
+const testGreekUtf8 = <int>[
   0xce, 0x93, 0xce, 0xb1, 0xce, 0xb6, 0xce, 0xad, // 8
   0xce, 0xb5, 0xcf, 0x82, 0x20, 0xce, 0xba, 0xce,
   0xb1, 0xe1, 0xbd, 0xb6, 0x20, 0xce, 0xbc, 0xcf,
@@ -95,11 +95,11 @@
   0x86, 0xcf, 0x89, 0xcf, 0x84, 0xce, 0xbf
 ];
 
-const String testKatakanaPhrase = """
+const String testKatakanaPhrase = '''
 イロハニホヘト チリヌルヲ ワカヨタレソ ツネナラム
-ウヰノオクヤマ ケフコエテ アサキユメミシ ヱヒモセスン""";
+ウヰノオクヤマ ケフコエテ アサキユメミシ ヱヒモセスン''';
 
-const List<int> testKatakanaUtf8 = <int>[
+const testKatakanaUtf8 = <int>[
   0xe3, 0x82, 0xa4, 0xe3, 0x83, 0xad, 0xe3, 0x83, // 8
   0x8f, 0xe3, 0x83, 0x8b, 0xe3, 0x83, 0x9b, 0xe3,
   0x83, 0x98, 0xe3, 0x83, 0x88, 0x20, 0xe3, 0x83,
@@ -130,22 +130,22 @@
 
 void testEncodeToUtf8() {
   expect.listEquals(
-      testEnglishUtf8, encodeUtf8(testEnglishPhrase), "english to utf8");
+      testEnglishUtf8, encodeUtf8(testEnglishPhrase), 'english to utf8');
 
   expect.listEquals(
-      testDanishUtf8, encodeUtf8(testDanishPhrase), "encode danish to utf8");
+      testDanishUtf8, encodeUtf8(testDanishPhrase), 'encode danish to utf8');
 
   expect.listEquals(
-      testHebrewUtf8, encodeUtf8(testHebrewPhrase), "Hebrew to utf8");
+      testHebrewUtf8, encodeUtf8(testHebrewPhrase), 'Hebrew to utf8');
 
   expect.listEquals(
-      testRussianUtf8, encodeUtf8(testRussianPhrase), "Russian to utf8");
+      testRussianUtf8, encodeUtf8(testRussianPhrase), 'Russian to utf8');
 
   expect.listEquals(
-      testGreekUtf8, encodeUtf8(testGreekPhrase), "Greek to utf8");
+      testGreekUtf8, encodeUtf8(testGreekPhrase), 'Greek to utf8');
 
   expect.listEquals(
-      testKatakanaUtf8, encodeUtf8(testKatakanaPhrase), "Katakana to utf8");
+      testKatakanaUtf8, encodeUtf8(testKatakanaPhrase), 'Katakana to utf8');
 }
 
 void testUtf8bytesToCodepoints() {
@@ -153,149 +153,149 @@
       [954, 972, 963, 956, 949],
       utf8ToCodepoints(
           [0xce, 0xba, 0xcf, 0x8c, 0xcf, 0x83, 0xce, 0xbc, 0xce, 0xb5]),
-      "κόσμε");
+      'κόσμε');
 
   // boundary conditions: First possible sequence of a certain length
-  expect.listEquals([], utf8ToCodepoints([]), "no input");
-  expect.listEquals([0x0], utf8ToCodepoints([0x0]), "0");
-  expect.listEquals([0x80], utf8ToCodepoints([0xc2, 0x80]), "80");
-  expect.listEquals([0x800], utf8ToCodepoints([0xe0, 0xa0, 0x80]), "800");
+  expect.listEquals([], utf8ToCodepoints([]), 'no input');
+  expect.listEquals([0x0], utf8ToCodepoints([0x0]), '0');
+  expect.listEquals([0x80], utf8ToCodepoints([0xc2, 0x80]), '80');
+  expect.listEquals([0x800], utf8ToCodepoints([0xe0, 0xa0, 0x80]), '800');
   expect.listEquals(
-      [0x10000], utf8ToCodepoints([0xf0, 0x90, 0x80, 0x80]), "10000");
+      [0x10000], utf8ToCodepoints([0xf0, 0x90, 0x80, 0x80]), '10000');
   expect.listEquals([UNICODE_REPLACEMENT_CHARACTER_CODEPOINT],
-      utf8ToCodepoints([0xf8, 0x88, 0x80, 0x80, 0x80]), "200000");
+      utf8ToCodepoints([0xf8, 0x88, 0x80, 0x80, 0x80]), '200000');
   expect.listEquals([UNICODE_REPLACEMENT_CHARACTER_CODEPOINT],
-      utf8ToCodepoints([0xfc, 0x84, 0x80, 0x80, 0x80, 0x80]), "4000000");
+      utf8ToCodepoints([0xfc, 0x84, 0x80, 0x80, 0x80, 0x80]), '4000000');
 
   // boundary conditions: Last possible sequence of a certain length
-  expect.listEquals([0x7f], utf8ToCodepoints([0x7f]), "7f");
-  expect.listEquals([0x7ff], utf8ToCodepoints([0xdf, 0xbf]), "7ff");
-  expect.listEquals([0xffff], utf8ToCodepoints([0xef, 0xbf, 0xbf]), "ffff");
+  expect.listEquals([0x7f], utf8ToCodepoints([0x7f]), '7f');
+  expect.listEquals([0x7ff], utf8ToCodepoints([0xdf, 0xbf]), '7ff');
+  expect.listEquals([0xffff], utf8ToCodepoints([0xef, 0xbf, 0xbf]), 'ffff');
   expect.listEquals([UNICODE_REPLACEMENT_CHARACTER_CODEPOINT],
-      utf8ToCodepoints([0xf7, 0xbf, 0xbf, 0xbf]), "1fffff");
+      utf8ToCodepoints([0xf7, 0xbf, 0xbf, 0xbf]), '1fffff');
   expect.listEquals([UNICODE_REPLACEMENT_CHARACTER_CODEPOINT],
-      utf8ToCodepoints([0xfb, 0xbf, 0xbf, 0xbf, 0xbf]), "3ffffff");
+      utf8ToCodepoints([0xfb, 0xbf, 0xbf, 0xbf, 0xbf]), '3ffffff');
   expect.listEquals([UNICODE_REPLACEMENT_CHARACTER_CODEPOINT],
-      utf8ToCodepoints([0xfd, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf]), "4000000");
+      utf8ToCodepoints([0xfd, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf]), '4000000');
 
   // other boundary conditions
-  expect.listEquals([0xd7ff], utf8ToCodepoints([0xed, 0x9f, 0xbf]), "d7ff");
-  expect.listEquals([0xe000], utf8ToCodepoints([0xee, 0x80, 0x80]), "e000");
+  expect.listEquals([0xd7ff], utf8ToCodepoints([0xed, 0x9f, 0xbf]), 'd7ff');
+  expect.listEquals([0xe000], utf8ToCodepoints([0xee, 0x80, 0x80]), 'e000');
   expect.listEquals([UNICODE_REPLACEMENT_CHARACTER_CODEPOINT],
-      utf8ToCodepoints([0xef, 0xbf, 0xbd]), "fffd");
+      utf8ToCodepoints([0xef, 0xbf, 0xbd]), 'fffd');
   expect.listEquals(
-      [0x10ffff], utf8ToCodepoints([0xf4, 0x8f, 0xbf, 0xbf]), "10ffff");
+      [0x10ffff], utf8ToCodepoints([0xf4, 0x8f, 0xbf, 0xbf]), '10ffff');
   expect.listEquals([UNICODE_REPLACEMENT_CHARACTER_CODEPOINT],
-      utf8ToCodepoints([0xf4, 0x90, 0x80, 0x80]), "110000");
+      utf8ToCodepoints([0xf4, 0x90, 0x80, 0x80]), '110000');
 
   // unexpected continuation bytes
   expect.listEquals([UNICODE_REPLACEMENT_CHARACTER_CODEPOINT],
-      utf8ToCodepoints([0x80]), "80 => replacement character");
+      utf8ToCodepoints([0x80]), '80 => replacement character');
   expect.listEquals([UNICODE_REPLACEMENT_CHARACTER_CODEPOINT],
-      utf8ToCodepoints([0xbf]), "bf => replacement character");
+      utf8ToCodepoints([0xbf]), 'bf => replacement character');
 
-  List<int> allContinuationBytes = <int>[];
-  List<int> matchingReplacementChars = <int>[];
-  for (int i = 0x80; i < 0xc0; i++) {
+  var allContinuationBytes = <int>[];
+  var matchingReplacementChars = <int>[];
+  for (var i = 0x80; i < 0xc0; i++) {
     allContinuationBytes.add(i);
     matchingReplacementChars.add(UNICODE_REPLACEMENT_CHARACTER_CODEPOINT);
   }
   expect.listEquals(
       matchingReplacementChars,
       utf8ToCodepoints(allContinuationBytes),
-      "80 - bf => replacement character x 64");
+      '80 - bf => replacement character x 64');
 
-  List<int> allFirstTwoByteSeq = <int>[];
+  var allFirstTwoByteSeq = <int>[];
   matchingReplacementChars = <int>[];
-  for (int i = 0xc0; i < 0xe0; i++) {
+  for (var i = 0xc0; i < 0xe0; i++) {
     allFirstTwoByteSeq.addAll([i, 0x20]);
     matchingReplacementChars.addAll([UNICODE_REPLACEMENT_CHARACTER_CODEPOINT]);
   }
   expect.listEquals(
       matchingReplacementChars,
       utf8ToCodepoints(allFirstTwoByteSeq),
-      "c0 - df + space => replacement character + space x 32");
+      'c0 - df + space => replacement character + space x 32');
 
-  List<int> allFirstThreeByteSeq = <int>[];
+  var allFirstThreeByteSeq = <int>[];
   matchingReplacementChars = <int>[];
-  for (int i = 0xe0; i < 0xf0; i++) {
+  for (var i = 0xe0; i < 0xf0; i++) {
     allFirstThreeByteSeq.addAll([i, 0x20]);
     matchingReplacementChars.addAll([UNICODE_REPLACEMENT_CHARACTER_CODEPOINT]);
   }
   expect.listEquals(
       matchingReplacementChars,
       utf8ToCodepoints(allFirstThreeByteSeq),
-      "e0 - ef + space => replacement character x 16");
+      'e0 - ef + space => replacement character x 16');
 
-  List<int> allFirstFourByteSeq = <int>[];
+  var allFirstFourByteSeq = <int>[];
   matchingReplacementChars = <int>[];
-  for (int i = 0xf0; i < 0xf8; i++) {
+  for (var i = 0xf0; i < 0xf8; i++) {
     allFirstFourByteSeq.addAll([i, 0x20]);
     matchingReplacementChars.addAll([UNICODE_REPLACEMENT_CHARACTER_CODEPOINT]);
   }
   expect.listEquals(
       matchingReplacementChars,
       utf8ToCodepoints(allFirstFourByteSeq),
-      "f0 - f7 + space => replacement character x 8");
+      'f0 - f7 + space => replacement character x 8');
 
-  List<int> allFirstFiveByteSeq = <int>[];
+  var allFirstFiveByteSeq = <int>[];
   matchingReplacementChars = <int>[];
-  for (int i = 0xf8; i < 0xfc; i++) {
+  for (var i = 0xf8; i < 0xfc; i++) {
     allFirstFiveByteSeq.addAll([i, 0x20]);
     matchingReplacementChars.addAll([UNICODE_REPLACEMENT_CHARACTER_CODEPOINT]);
   }
   expect.listEquals(
       matchingReplacementChars,
       utf8ToCodepoints(allFirstFiveByteSeq),
-      "f8 - fb + space => replacement character x 4");
+      'f8 - fb + space => replacement character x 4');
 
-  List<int> allFirstSixByteSeq = <int>[];
+  var allFirstSixByteSeq = <int>[];
   matchingReplacementChars = <int>[];
-  for (int i = 0xfc; i < 0xfe; i++) {
+  for (var i = 0xfc; i < 0xfe; i++) {
     allFirstSixByteSeq.addAll([i, 0x20]);
     matchingReplacementChars.addAll([UNICODE_REPLACEMENT_CHARACTER_CODEPOINT]);
   }
   expect.listEquals(
       matchingReplacementChars,
       utf8ToCodepoints(allFirstSixByteSeq),
-      "fc - fd + space => replacement character x 2");
+      'fc - fd + space => replacement character x 2');
 
   // Sequences with last continuation byte missing
   expect.listEquals([UNICODE_REPLACEMENT_CHARACTER_CODEPOINT],
-      utf8ToCodepoints([0xc2]), "2-byte sequence with last byte missing");
+      utf8ToCodepoints([0xc2]), '2-byte sequence with last byte missing');
   expect.listEquals([UNICODE_REPLACEMENT_CHARACTER_CODEPOINT],
-      utf8ToCodepoints([0xe0, 0x80]), "3-byte sequence with last byte missing");
+      utf8ToCodepoints([0xe0, 0x80]), '3-byte sequence with last byte missing');
   expect.listEquals(
       [UNICODE_REPLACEMENT_CHARACTER_CODEPOINT],
       utf8ToCodepoints([0xf0, 0x80, 0x80]),
-      "4-byte sequence with last byte missing");
+      '4-byte sequence with last byte missing');
   expect.listEquals(
       [UNICODE_REPLACEMENT_CHARACTER_CODEPOINT],
       utf8ToCodepoints([0xf8, 0x88, 0x80, 0x80]),
-      "5-byte sequence with last byte missing");
+      '5-byte sequence with last byte missing');
   expect.listEquals(
       [UNICODE_REPLACEMENT_CHARACTER_CODEPOINT],
       utf8ToCodepoints([0xfc, 0x80, 0x80, 0x80, 0x80]),
-      "6-byte sequence with last byte missing");
+      '6-byte sequence with last byte missing');
 
   expect.listEquals([UNICODE_REPLACEMENT_CHARACTER_CODEPOINT],
-      utf8ToCodepoints([0xdf]), "2-byte sequence with last byte missing (hi)");
+      utf8ToCodepoints([0xdf]), '2-byte sequence with last byte missing (hi)');
   expect.listEquals(
       [UNICODE_REPLACEMENT_CHARACTER_CODEPOINT],
       utf8ToCodepoints([0xef, 0xbf]),
-      "3-byte sequence with last byte missing (hi)");
+      '3-byte sequence with last byte missing (hi)');
   expect.listEquals(
       [UNICODE_REPLACEMENT_CHARACTER_CODEPOINT],
       utf8ToCodepoints([0xf7, 0xbf, 0xbf]),
-      "4-byte sequence with last byte missing (hi)");
+      '4-byte sequence with last byte missing (hi)');
   expect.listEquals(
       [UNICODE_REPLACEMENT_CHARACTER_CODEPOINT],
       utf8ToCodepoints([0xfb, 0xbf, 0xbf, 0xbf]),
-      "5-byte sequence with last byte missing (hi)");
+      '5-byte sequence with last byte missing (hi)');
   expect.listEquals(
       [UNICODE_REPLACEMENT_CHARACTER_CODEPOINT],
       utf8ToCodepoints([0xfd, 0xbf, 0xbf, 0xbf, 0xbf]),
-      "6-byte sequence with last byte missing (hi)");
+      '6-byte sequence with last byte missing (hi)');
 
   // Concatenation of incomplete sequences
   expect.listEquals(
@@ -323,141 +323,141 @@
         0xfb, 0xbf, 0xbf, 0xbf,
         0xfd, 0xbf, 0xbf, 0xbf, 0xbf
       ]),
-      "Concatenation of incomplete sequences");
+      'Concatenation of incomplete sequences');
 
   // Impossible bytes
   expect.listEquals([UNICODE_REPLACEMENT_CHARACTER_CODEPOINT],
-      utf8ToCodepoints([0xfe]), "fe");
+      utf8ToCodepoints([0xfe]), 'fe');
   expect.listEquals([UNICODE_REPLACEMENT_CHARACTER_CODEPOINT],
-      utf8ToCodepoints([0xff]), "ff");
+      utf8ToCodepoints([0xff]), 'ff');
   expect.listEquals([
     UNICODE_REPLACEMENT_CHARACTER_CODEPOINT,
     UNICODE_REPLACEMENT_CHARACTER_CODEPOINT,
     UNICODE_REPLACEMENT_CHARACTER_CODEPOINT,
     UNICODE_REPLACEMENT_CHARACTER_CODEPOINT
-  ], utf8ToCodepoints([0xfe, 0xfe, 0xff, 0xff]), "fe fe ff ff");
+  ], utf8ToCodepoints([0xfe, 0xfe, 0xff, 0xff]), 'fe fe ff ff');
 
   // Overlong sequences
   expect.listEquals([UNICODE_REPLACEMENT_CHARACTER_CODEPOINT],
-      utf8ToCodepoints([0xc0, 0xaf]), "c0 af");
+      utf8ToCodepoints([0xc0, 0xaf]), 'c0 af');
   expect.listEquals([UNICODE_REPLACEMENT_CHARACTER_CODEPOINT],
-      utf8ToCodepoints([0xe0, 0x80, 0xaf]), "e0 80 af");
+      utf8ToCodepoints([0xe0, 0x80, 0xaf]), 'e0 80 af');
   expect.listEquals([UNICODE_REPLACEMENT_CHARACTER_CODEPOINT],
-      utf8ToCodepoints([0xf0, 0x80, 0x80, 0xaf]), "f0 80 80 af");
+      utf8ToCodepoints([0xf0, 0x80, 0x80, 0xaf]), 'f0 80 80 af');
   expect.listEquals([UNICODE_REPLACEMENT_CHARACTER_CODEPOINT],
-      utf8ToCodepoints([0xf8, 0x80, 0x80, 0x80, 0xaf]), "f8 80 80 80 af");
+      utf8ToCodepoints([0xf8, 0x80, 0x80, 0x80, 0xaf]), 'f8 80 80 80 af');
   expect.listEquals(
       [UNICODE_REPLACEMENT_CHARACTER_CODEPOINT],
       utf8ToCodepoints([0xfc, 0x80, 0x80, 0x80, 0x80, 0xaf]),
-      "fc 80 80 80 80 af");
+      'fc 80 80 80 80 af');
 
   expect.listEquals([UNICODE_REPLACEMENT_CHARACTER_CODEPOINT],
-      utf8ToCodepoints([0xc1, 0xbf]), "c1 bf");
+      utf8ToCodepoints([0xc1, 0xbf]), 'c1 bf');
   expect.listEquals([UNICODE_REPLACEMENT_CHARACTER_CODEPOINT],
-      utf8ToCodepoints([0xe0, 0x9f, 0xbf]), "e0 9f bf");
+      utf8ToCodepoints([0xe0, 0x9f, 0xbf]), 'e0 9f bf');
   expect.listEquals([UNICODE_REPLACEMENT_CHARACTER_CODEPOINT],
-      utf8ToCodepoints([0xf0, 0x8f, 0xbf, 0xbf]), "f0 8f bf bf");
+      utf8ToCodepoints([0xf0, 0x8f, 0xbf, 0xbf]), 'f0 8f bf bf');
   expect.listEquals([UNICODE_REPLACEMENT_CHARACTER_CODEPOINT],
-      utf8ToCodepoints([0xf8, 0x87, 0xbf, 0xbf, 0xbf]), "f8 87 bf bf bf");
+      utf8ToCodepoints([0xf8, 0x87, 0xbf, 0xbf, 0xbf]), 'f8 87 bf bf bf');
   expect.listEquals(
       [UNICODE_REPLACEMENT_CHARACTER_CODEPOINT],
       utf8ToCodepoints([0xfc, 0x83, 0xbf, 0xbf, 0xbf, 0xbf]),
-      "fc 83 bf bf bf bf");
+      'fc 83 bf bf bf bf');
 
   expect.listEquals([UNICODE_REPLACEMENT_CHARACTER_CODEPOINT],
-      utf8ToCodepoints([0xc0, 0x80]), "c0 80");
+      utf8ToCodepoints([0xc0, 0x80]), 'c0 80');
   expect.listEquals([UNICODE_REPLACEMENT_CHARACTER_CODEPOINT],
-      utf8ToCodepoints([0xe0, 0x80, 0x80]), "e0 80 80");
+      utf8ToCodepoints([0xe0, 0x80, 0x80]), 'e0 80 80');
   expect.listEquals([UNICODE_REPLACEMENT_CHARACTER_CODEPOINT],
-      utf8ToCodepoints([0xf0, 0x80, 0x80, 0x80]), "f0 80 80 80");
+      utf8ToCodepoints([0xf0, 0x80, 0x80, 0x80]), 'f0 80 80 80');
   expect.listEquals([UNICODE_REPLACEMENT_CHARACTER_CODEPOINT],
-      utf8ToCodepoints([0xf8, 0x80, 0x80, 0x80, 0x80]), "f8 80 80 80 80");
+      utf8ToCodepoints([0xf8, 0x80, 0x80, 0x80, 0x80]), 'f8 80 80 80 80');
   expect.listEquals(
       [UNICODE_REPLACEMENT_CHARACTER_CODEPOINT],
       utf8ToCodepoints([0xfc, 0x80, 0x80, 0x80, 0x80, 0x80]),
-      "fc 80 80 80 80 80");
+      'fc 80 80 80 80 80');
 
   // Illegal code positions
   expect.listEquals([UNICODE_REPLACEMENT_CHARACTER_CODEPOINT],
-      utf8ToCodepoints([0xed, 0xa0, 0x80]), "U+D800");
+      utf8ToCodepoints([0xed, 0xa0, 0x80]), 'U+D800');
   expect.listEquals([UNICODE_REPLACEMENT_CHARACTER_CODEPOINT],
-      utf8ToCodepoints([0xed, 0xad, 0xbf]), "U+DB7F");
+      utf8ToCodepoints([0xed, 0xad, 0xbf]), 'U+DB7F');
   expect.listEquals([UNICODE_REPLACEMENT_CHARACTER_CODEPOINT],
-      utf8ToCodepoints([0xed, 0xae, 0x80]), "U+DB80");
+      utf8ToCodepoints([0xed, 0xae, 0x80]), 'U+DB80');
   expect.listEquals([UNICODE_REPLACEMENT_CHARACTER_CODEPOINT],
-      utf8ToCodepoints([0xed, 0xaf, 0xbf]), "U+DBFF");
+      utf8ToCodepoints([0xed, 0xaf, 0xbf]), 'U+DBFF');
   expect.listEquals([UNICODE_REPLACEMENT_CHARACTER_CODEPOINT],
-      utf8ToCodepoints([0xed, 0xb0, 0x80]), "U+DC00");
+      utf8ToCodepoints([0xed, 0xb0, 0x80]), 'U+DC00');
   expect.listEquals([UNICODE_REPLACEMENT_CHARACTER_CODEPOINT],
-      utf8ToCodepoints([0xed, 0xbe, 0x80]), "U+DF80");
+      utf8ToCodepoints([0xed, 0xbe, 0x80]), 'U+DF80');
   expect.listEquals([UNICODE_REPLACEMENT_CHARACTER_CODEPOINT],
-      utf8ToCodepoints([0xed, 0xbf, 0xbf]), "U+DFFF");
+      utf8ToCodepoints([0xed, 0xbf, 0xbf]), 'U+DFFF');
 
   // Paired UTF-16 surrogates
   expect.listEquals([
     UNICODE_REPLACEMENT_CHARACTER_CODEPOINT,
     UNICODE_REPLACEMENT_CHARACTER_CODEPOINT
-  ], utf8ToCodepoints([0xed, 0xa0, 0x80, 0xed, 0xb0, 0x80]), "U+D800 U+DC00");
+  ], utf8ToCodepoints([0xed, 0xa0, 0x80, 0xed, 0xb0, 0x80]), 'U+D800 U+DC00');
   expect.listEquals([
     UNICODE_REPLACEMENT_CHARACTER_CODEPOINT,
     UNICODE_REPLACEMENT_CHARACTER_CODEPOINT
-  ], utf8ToCodepoints([0xed, 0xa0, 0x80, 0xed, 0xbf, 0xbf]), "U+D800 U+DFFF");
+  ], utf8ToCodepoints([0xed, 0xa0, 0x80, 0xed, 0xbf, 0xbf]), 'U+D800 U+DFFF');
   expect.listEquals([
     UNICODE_REPLACEMENT_CHARACTER_CODEPOINT,
     UNICODE_REPLACEMENT_CHARACTER_CODEPOINT
-  ], utf8ToCodepoints([0xed, 0xad, 0xbf, 0xed, 0xb0, 0x80]), "U+DB7F U+DC00");
+  ], utf8ToCodepoints([0xed, 0xad, 0xbf, 0xed, 0xb0, 0x80]), 'U+DB7F U+DC00');
   expect.listEquals([
     UNICODE_REPLACEMENT_CHARACTER_CODEPOINT,
     UNICODE_REPLACEMENT_CHARACTER_CODEPOINT
-  ], utf8ToCodepoints([0xed, 0xad, 0xbf, 0xed, 0xbf, 0xbf]), "U+DB7F U+DFFF");
+  ], utf8ToCodepoints([0xed, 0xad, 0xbf, 0xed, 0xbf, 0xbf]), 'U+DB7F U+DFFF');
   expect.listEquals([
     UNICODE_REPLACEMENT_CHARACTER_CODEPOINT,
     UNICODE_REPLACEMENT_CHARACTER_CODEPOINT
-  ], utf8ToCodepoints([0xed, 0xae, 0x80, 0xed, 0xb0, 0x80]), "U+DB80 U+DC00");
+  ], utf8ToCodepoints([0xed, 0xae, 0x80, 0xed, 0xb0, 0x80]), 'U+DB80 U+DC00');
   expect.listEquals([
     UNICODE_REPLACEMENT_CHARACTER_CODEPOINT,
     UNICODE_REPLACEMENT_CHARACTER_CODEPOINT
-  ], utf8ToCodepoints([0xed, 0xae, 0x80, 0xed, 0xbf, 0xbf]), "U+DB80 U+DFFF");
+  ], utf8ToCodepoints([0xed, 0xae, 0x80, 0xed, 0xbf, 0xbf]), 'U+DB80 U+DFFF');
   expect.listEquals([
     UNICODE_REPLACEMENT_CHARACTER_CODEPOINT,
     UNICODE_REPLACEMENT_CHARACTER_CODEPOINT
-  ], utf8ToCodepoints([0xed, 0xaf, 0xbf, 0xed, 0xb0, 0x80]), "U+DBFF U+DC00");
+  ], utf8ToCodepoints([0xed, 0xaf, 0xbf, 0xed, 0xb0, 0x80]), 'U+DBFF U+DC00');
   expect.listEquals([
     UNICODE_REPLACEMENT_CHARACTER_CODEPOINT,
     UNICODE_REPLACEMENT_CHARACTER_CODEPOINT
-  ], utf8ToCodepoints([0xed, 0xaf, 0xbf, 0xed, 0xbf, 0xbf]), "U+DBFF U+DFFF");
+  ], utf8ToCodepoints([0xed, 0xaf, 0xbf, 0xed, 0xbf, 0xbf]), 'U+DBFF U+DFFF');
 
   // Other illegal code positions (???)
-  expect.listEquals([0xfffe], utf8ToCodepoints([0xef, 0xbf, 0xbe]), "U+FFFE");
-  expect.listEquals([0xffff], utf8ToCodepoints([0xef, 0xbf, 0xbf]), "U+FFFF");
+  expect.listEquals([0xfffe], utf8ToCodepoints([0xef, 0xbf, 0xbe]), 'U+FFFE');
+  expect.listEquals([0xffff], utf8ToCodepoints([0xef, 0xbf, 0xbf]), 'U+FFFF');
 }
 
 void testUtf8BytesToString() {
   expect.stringEquals(
-      testEnglishPhrase, decodeUtf8(testEnglishUtf8), "English");
+      testEnglishPhrase, decodeUtf8(testEnglishUtf8), 'English');
 
-  expect.stringEquals(testDanishPhrase, decodeUtf8(testDanishUtf8), "Danish");
+  expect.stringEquals(testDanishPhrase, decodeUtf8(testDanishUtf8), 'Danish');
 
-  expect.stringEquals(testHebrewPhrase, decodeUtf8(testHebrewUtf8), "Hebrew");
+  expect.stringEquals(testHebrewPhrase, decodeUtf8(testHebrewUtf8), 'Hebrew');
 
   expect.stringEquals(
-      testRussianPhrase, decodeUtf8(testRussianUtf8), "Russian");
+      testRussianPhrase, decodeUtf8(testRussianUtf8), 'Russian');
 
-  expect.stringEquals(testGreekPhrase, decodeUtf8(testGreekUtf8), "Greek");
+  expect.stringEquals(testGreekPhrase, decodeUtf8(testGreekUtf8), 'Greek');
 
   expect.stringEquals(
-      testKatakanaPhrase, decodeUtf8(testKatakanaUtf8), "Katakana");
+      testKatakanaPhrase, decodeUtf8(testKatakanaUtf8), 'Katakana');
 }
 
 void testIterableMethods() {
-  IterableUtf8Decoder englishDecoder = decodeUtf8AsIterable(testEnglishUtf8);
+  var englishDecoder = decodeUtf8AsIterable(testEnglishUtf8);
   // get the first character
   expect.equals(testEnglishUtf8[0], englishDecoder.first);
   // get the whole translation using the Iterable interface
   expect.stringEquals(
       testEnglishPhrase, String.fromCharCodes(List<int>.from(englishDecoder)));
 
-  IterableUtf8Decoder kataDecoder = decodeUtf8AsIterable(testKatakanaUtf8);
+  var kataDecoder = decodeUtf8AsIterable(testKatakanaUtf8);
   // get the first character
   expect.equals(testKatakanaPhrase.codeUnits[0], kataDecoder.first);
   // get the whole translation using the Iterable interface
diff --git a/test/utf8_test.dart b/test/utf8_test.dart
index c1192bc..8157a09 100644
--- a/test/utf8_test.dart
+++ b/test/utf8_test.dart
@@ -5,7 +5,7 @@
 library utf.utf8_test;
 
 import 'package:test/test.dart';
-import "package:utf/utf.dart";
+import 'package:utf/utf.dart';
 
 import 'expect.dart' as expect;
 
@@ -13,14 +13,14 @@
 
 void main() {
   test('Google favorite: "Îñţérñåţîöñåļîžåţîờñ"', () {
-    String string = decode([
+    var string = decode([
       0xc3, 0x8e, 0xc3, 0xb1, 0xc5, 0xa3, 0xc3, 0xa9, 0x72, // 8
       0xc3, 0xb1, 0xc3, 0xa5, 0xc5, 0xa3, 0xc3, 0xae, 0xc3,
       0xb6, 0xc3, 0xb1, 0xc3, 0xa5, 0xc4, 0xbc, 0xc3, 0xae,
       0xc5, 0xbe, 0xc3, 0xa5, 0xc5, 0xa3, 0xc3, 0xae, 0xe1,
       0xbb, 0x9d, 0xc3, 0xb1
     ]);
-    expect.stringEquals("Îñţérñåţîöñåļîžåţîờñ", string);
+    expect.stringEquals('Îñţérñåţîöñåļîžåţîờñ', string);
   });
 
   test('Blueberry porridge in Danish: "blåbærgrød"', () {
@@ -28,7 +28,7 @@
       0x62, 0x6c, 0xc3, 0xa5, 0x62, 0xc3, 0xa6, 0x72, 0x67, 0x72, // 8
       0xc3, 0xb8, 0x64
     ]);
-    expect.stringEquals("blåbærgrød", string);
+    expect.stringEquals('blåbærgrød', string);
   });
 
   test('"சிவா அணாமாைல", that is "Siva Annamalai" in Tamil.', () {
@@ -38,7 +38,7 @@
       0xae, 0xbe, 0xe0, 0xae, 0xae, 0xe0, 0xae, 0xbe, 0xe0, 0xaf,
       0x88, 0xe0, 0xae, 0xb2
     ]);
-    expect.stringEquals("சிவா அணாமாைல", string);
+    expect.stringEquals('சிவா அணாமாைல', string);
   });
 
   test('"िसवा अणामालै", that is "Siva Annamalai" in Devanagari', () {
@@ -48,15 +48,15 @@
       0xa4, 0xbe, 0xe0, 0xa4, 0xae, 0xe0, 0xa4, 0xbe, 0xe0, 0xa4,
       0xb2, 0xe0, 0xa5, 0x88
     ]);
-    expect.stringEquals("िसवा अणामालै", string);
+    expect.stringEquals('िसवा अणामालै', string);
   });
 
   test('DESERET CAPITAL LETTER BEE, unicode 0x10412(0xD801+0xDC12', () {
     // UTF-8: F0 90 90 92
     var string = decode([0xf0, 0x90, 0x90, 0x92]);
     expect.equals(string.length, 2);
-    expect.equals("𐐒".length, 2);
-    expect.stringEquals("𐐒", string);
+    expect.equals('𐐒'.length, 2);
+    expect.stringEquals('𐐒', string);
   });
   // TODO(ahe): Add tests of bad input.
 }
diff --git a/test/utf_test.dart b/test/utf_test.dart
index 504fb2e..24a8205 100644
--- a/test/utf_test.dart
+++ b/test/utf_test.dart
@@ -5,13 +5,13 @@
 library utf.utf_test;
 
 import 'package:test/test.dart';
-import "package:utf/utf.dart";
+import 'package:utf/utf.dart';
 
-import "expect.dart" as expect;
+import 'expect.dart' as expect;
 
-main() {
+void main() {
   test('utf', () {
-    String str = String.fromCharCodes([0x1d537]);
+    var str = String.fromCharCodes([0x1d537]);
     // String.codeUnits gives 16-bit code units, but stringToCodepoints gives
     // back the original code points.
     expect.listEquals([0xd835, 0xdd37], str.codeUnits);