From 282d78ee9707f89eb22dfdad97461fce46afd7cb Mon Sep 17 00:00:00 2001 From: Alex Li Date: Mon, 29 Jan 2024 22:53:29 +0800 Subject: [PATCH 1/2] Update decoder.dart --- lib/src/hex/decoder.dart | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/src/hex/decoder.dart b/lib/src/hex/decoder.dart index 848a4ae..3696d4d 100644 --- a/lib/src/hex/decoder.dart +++ b/lib/src/hex/decoder.dart @@ -19,10 +19,13 @@ class HexDecoder extends Converter> { const HexDecoder._(); @override - List convert(String input) { + Uint8List convert(String input) { if (!input.length.isEven) { throw FormatException( - 'Invalid input length, must be even.', input, input.length); + 'Invalid input length, must be even.', + input, + input.length, + ); } var bytes = Uint8List(input.length ~/ 2); From 711f441e89d68465f87922bd0e5038a2ba054aa3 Mon Sep 17 00:00:00 2001 From: Alex Li Date: Tue, 7 May 2024 21:15:25 +0800 Subject: [PATCH 2/2] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 00b795d..616223a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ - Require Dart 3.0 - Add chunked decoding support (`startChunkedConversion`) for `CodePage` encodings. +- Upper-cast the return type of the decoder from `List` to `Uint8List`. ## 3.1.1