Skip to content

Commit 7ed974c

Browse files
committed
feat(dynamite_runtime): export HttpBytesStreamExtension
Signed-off-by: Nikolas Rimikis <leptopoda@users.noreply.github.com>
1 parent c5fa6f6 commit 7ed974c

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

packages/dynamite/dynamite_runtime/lib/src/utils/byte_stream_extension.dart

+1-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import 'package:xml/xml_events.dart';
1212
final xmlConverter = XmlEventDecoder().fuse(const XmlNormalizeEvents()).fuse(const XmlNodeDecoder());
1313

1414
/// Extension on byte streams that enable efficient transformations.
15-
@internal
1615
extension HttpBytesStreamExtension on http.ByteStream {
1716
/// Collects the data of this stream in a [Uint8List].
1817
///
@@ -35,7 +34,7 @@ extension HttpBytesStreamExtension on http.ByteStream {
3534

3635
/// Collect the data of this stream in [XmlElement], decoded according to
3736
/// [encoding], which defaults to [utf8].
38-
Future<Object?> bytesToXml([Encoding encoding = utf8]) async {
37+
Future<XmlElement?> bytesToXml([Encoding encoding = utf8]) async {
3938
final element = await encoding.decoder
4039
.fuse(xmlConverter)
4140
.bind(this)
@@ -52,7 +51,6 @@ extension HttpBytesStreamExtension on http.ByteStream {
5251
/// charset is unknown.
5352
///
5453
/// Copied from `package:http`.
55-
@internal
5654
Encoding encodingForHeaders(Map<String, String> headers) =>
5755
_encodingForCharset(_contentTypeForHeaders(headers).parameters['charset']);
5856

packages/dynamite/dynamite_runtime/lib/utils.dart

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/// Utility functions used by the generated code.
22
library utils;
33

4+
export 'src/utils/byte_stream_extension.dart';
45
export 'src/utils/codecs.dart';
56
export 'src/utils/some_of_validators.dart';
67
export 'src/utils/string_checker.dart';

0 commit comments

Comments
 (0)