Index: pkg/http/lib/src/utils.dart |
diff --git a/pkg/http/lib/src/utils.dart b/pkg/http/lib/src/utils.dart |
index 64c50c4269e0c0e9c6a09701c0f1ec7465811625..3420a2e3b120814fbc56ff4defc87b2862586989 100644 |
--- a/pkg/http/lib/src/utils.dart |
+++ b/pkg/http/lib/src/utils.dart |
@@ -112,7 +112,9 @@ bool isPlainAscii(String string) => _ASCII_ONLY.hasMatch(string); |
/// If [input] is a [TypedData], this just returns a view on [input]. |
Uint8List toUint8List(List<int> input) { |
if (input is Uint8List) return input; |
- if (input is TypedData) return new Uint8List.view(input.buffer); |
+ if (input is TypedData) { |
+ return new Uint8List.view((input as TypedData).buffer); |
+ } |
return new Uint8List.fromList(input); |
} |