From 8da28863dd5db6547b89de5c141074ad7b7cec3a Mon Sep 17 00:00:00 2001 From: Chien Date: Tue, 6 Jun 2023 11:11:42 +0800 Subject: [PATCH] Fix `createHttpClient` example in README (#1853) --- dio/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dio/README.md b/dio/README.md index daa75e16c..c877d65ed 100644 --- a/dio/README.md +++ b/dio/README.md @@ -783,7 +783,7 @@ Unlike other methods, this one works with the certificate of the server itself. void initAdapter() { const String fingerprint = 'ee5ce1dfa7a53657c545c62b65802e4272878dabd65c0aadcf85783ebb0b4d5c'; dio.httpClientAdapter = IOHttpClientAdapter( - createHttpClient = () { + createHttpClient: () { // Don't trust any certificate just because their root cert is trusted. final HttpClient client = HttpClient(context: SecurityContext(withTrustedRoots: false)); // You can test the intermediate / root cert here. We just ignore it.