From bf96551406600a2ec520a4248ff635bfd268edeb Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Wed, 26 Jun 2024 17:43:35 -0700 Subject: [PATCH] Call out more limitations of runWithClient (#1248) Towards #828 Add a section in the `runWithClient` doc that mentions HTTP requests which _aren't_ affected by usage of this API - specifically requests made through the SDK core libraries, or through instantiating specific client implementations. --- pkgs/http/lib/src/client.dart | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/http/lib/src/client.dart b/pkgs/http/lib/src/client.dart index 7429ca8824..85f0a4022a 100644 --- a/pkgs/http/lib/src/client.dart +++ b/pkgs/http/lib/src/client.dart @@ -198,6 +198,10 @@ Client? get zoneClient { /// and the convenience HTTP functions (e.g. [http.get]). If [clientFactory] /// returns `Client()` then the default [Client] is used. /// +/// Only fresh `Client` instances using the default constructor are impacted. +/// HTTP requests made using `dart:io` or `dart:html` APIs, +/// or using specifically instantiated client implementations, are not affected. +/// /// When used in the context of Flutter, [runWithClient] should be called before /// [`WidgetsFlutterBinding.ensureInitialized`](https://api.flutter.dev/flutter/widgets/WidgetsFlutterBinding/ensureInitialized.html) /// because Flutter runs in whatever [Zone] was current at the time that the