Commit 71242888 authored by Todd Volkert's avatar Todd Volkert Committed by GitHub

Revert method generics in `packages/flutter/lib/src/http` (#7662)

We converted all code to use method generics in #7235, but
we shouldn't have touched the `http` folder since this code
is pulled from upstream.
parent f3f2747a
......@@ -161,7 +161,7 @@ Future<String> read(dynamic url, {Map<String, String> headers}) =>
Future<Uint8List> readBytes(dynamic url, {Map<String, String> headers}) =>
_withClient((Client client) => client.readBytes(url, headers: headers));
Future<T> _withClient<T>(Future<T> fn(Client client)) async {
Future/*<T>*/ _withClient/*<T>*/(Future/*<T>*/ fn(Client client)) async {
Client client = new Client();
try {
return await fn(client);
......
......@@ -62,7 +62,7 @@ class IOClient extends BaseClient {
});
return new StreamedResponse(
DelegatingStream.typed<List<int>>(response).handleError((dynamic error) =>
DelegatingStream.typed/*<List<int>>*/(response).handleError((dynamic error) =>
throw new ClientException(error.message, error.uri),
test: (dynamic error) => io.isHttpException(error)),
response.statusCode,
......
......@@ -85,7 +85,7 @@ ByteStream toByteStream(Stream<List<int>> stream) {
/// Calls [onDone] once [stream] (a single-subscription [Stream]) is finished.
/// The return value, also a single-subscription [Stream] should be used in
/// place of [stream] after calling this method.
Stream<T> onDone<T>(Stream<T> stream, void onDone()) =>
Stream/*<T>*/ onDone/*<T>*/(Stream/*<T>*/ stream, void onDone()) =>
stream.transform(new StreamTransformer.fromHandlers(handleDone: (EventSink<dynamic> sink) { // ignore: always_specify_types
sink.close();
onDone();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment