From 773b404a1c91e4a7897921da23ff0726ffb97d29 Mon Sep 17 00:00:00 2001 From: Ellet Date: Sun, 5 Jul 2026 02:48:24 +0300 Subject: [PATCH 1/2] docs(http): fixes invalid doc comment of IOClient Fixes #1947 --- pkgs/http/lib/src/io_client.dart | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/http/lib/src/io_client.dart b/pkgs/http/lib/src/io_client.dart index a00ef9dd03..0ed62aee86 100644 --- a/pkgs/http/lib/src/io_client.dart +++ b/pkgs/http/lib/src/io_client.dart @@ -68,16 +68,16 @@ class _IOStreamedResponseV2 extends IOStreamedResponse /// callers to get more detailed exception information for socket-level /// failures, if desired. /// -/// For example: +/// Example: /// ```dart -/// final client = http.Client(); +/// final BaseClient client = IOClient(); /// late String data; /// try { /// data = await client.read(Uri.https('example.com', '')); -/// } on SocketException catch (e) { -/// // Exception is transport-related, check `e.osError` for more details. /// } on http.ClientException catch (e) { -/// // Exception is HTTP-related (e.g. the server returned a 404 status code). +/// // Exception is transport-related. +/// // If platform-specific socket details are needed, catch `SocketException` +/// // before `ClientException` (or without `ClientException`) and inspect `osError` for more details. /// // If the handler for `SocketException` were removed then all exceptions /// // would be caught by this handler. /// } From 3bf88c96e1b939a7beeed09073adbb89cc0a668c Mon Sep 17 00:00:00 2001 From: Ellet Date: Tue, 7 Jul 2026 03:17:44 +0300 Subject: [PATCH 2/2] Update pkgs/http/lib/src/io_client.dart Co-authored-by: Brian Quinlan --- pkgs/http/lib/src/io_client.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/http/lib/src/io_client.dart b/pkgs/http/lib/src/io_client.dart index 0ed62aee86..7a66036e48 100644 --- a/pkgs/http/lib/src/io_client.dart +++ b/pkgs/http/lib/src/io_client.dart @@ -70,7 +70,7 @@ class _IOStreamedResponseV2 extends IOStreamedResponse /// /// Example: /// ```dart -/// final BaseClient client = IOClient(); +/// final client = IOClient(); /// late String data; /// try { /// data = await client.read(Uri.https('example.com', ''));