runZoned<R> 静态方法
- R body(), {
- HttpClient createHttpClient()?,
- String findProxyFromEnvironment()?,
使用提供的覆盖运行 body
的新鲜 Zone。
实现
static R runZoned<R>(R Function() body,
{HttpClient Function(SecurityContext?)? createHttpClient,
String Function(Uri uri, Map<String, String>? environment)?
findProxyFromEnvironment}) {
HttpOverrides overrides =
_HttpOverridesScope(createHttpClient, findProxyFromEnvironment);
return dart_async.runZoned<R>(body,
zoneValues: {_httpOverridesToken: overrides});
}