From c743dc13147785d8f0dee913ab9048177b429366 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Melih=20Ar=C4=B1k?= Date: Tue, 21 Jul 2026 19:53:54 +0300 Subject: [PATCH] doc(http_profile): fix broken code examples in header setter docs --- pkgs/http_profile/CHANGELOG.md | 2 ++ pkgs/http_profile/lib/src/http_profile_request_data.dart | 6 +++--- pkgs/http_profile/lib/src/http_profile_response_data.dart | 6 +++--- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/pkgs/http_profile/CHANGELOG.md b/pkgs/http_profile/CHANGELOG.md index fdcad42253..78698aaec2 100644 --- a/pkgs/http_profile/CHANGELOG.md +++ b/pkgs/http_profile/CHANGELOG.md @@ -1,6 +1,8 @@ ## 0.1.1-wip * Fixed unintended HTML tags in doc comments. +* Fixed the code examples in the `headersListValues` and `headersCommaValues` + doc comments. ## 0.1.0 diff --git a/pkgs/http_profile/lib/src/http_profile_request_data.dart b/pkgs/http_profile/lib/src/http_profile_request_data.dart index 60b1d8e8fe..e5dd04a63d 100644 --- a/pkgs/http_profile/lib/src/http_profile_request_data.dart +++ b/pkgs/http_profile/lib/src/http_profile_request_data.dart @@ -97,7 +97,7 @@ final class HttpProfileRequestData { /// // Foo: Bar /// // Foo: Baz /// - /// profile?.requestData.headersListValues({'Foo': ['Bar', 'Baz']}); + /// profile?.requestData.headersListValues = {'Foo': ['Bar', 'Baz']}; /// ``` set headersListValues(Map>? value) { _checkAndUpdate(); @@ -117,7 +117,7 @@ final class HttpProfileRequestData { /// // Foo: Bar /// // Foo: Baz /// - /// profile?.requestData.headersCommaValues({'Foo': 'Bar, Baz']}); + /// profile?.requestData.headersCommaValues = {'Foo': 'Bar, Baz'}; /// ``` set headersCommaValues(Map? value) { _checkAndUpdate(); @@ -134,7 +134,7 @@ final class HttpProfileRequestData { /// For example, the map /// /// ```dart - /// {'Foo': ['Bar', 'Baz']}); + /// {'Foo': ['Bar', 'Baz']} /// ``` /// /// represents the headers diff --git a/pkgs/http_profile/lib/src/http_profile_response_data.dart b/pkgs/http_profile/lib/src/http_profile_response_data.dart index 7aead9e068..2e610839a7 100644 --- a/pkgs/http_profile/lib/src/http_profile_response_data.dart +++ b/pkgs/http_profile/lib/src/http_profile_response_data.dart @@ -95,7 +95,7 @@ final class HttpProfileResponseData { /// // Foo: Bar /// // Foo: Baz /// - /// profile?.requestData.headersListValues({'Foo': ['Bar', 'Baz']}); + /// profile?.responseData.headersListValues = {'Foo': ['Bar', 'Baz']}; /// ``` set headersListValues(Map>? value) { _checkAndUpdate(); @@ -115,7 +115,7 @@ final class HttpProfileResponseData { /// // Foo: Bar /// // Foo: Baz /// - /// profile?.responseData.headersCommaValues({'Foo': 'Bar, Baz']}); + /// profile?.responseData.headersCommaValues = {'Foo': 'Bar, Baz'}; /// ``` set headersCommaValues(Map? value) { _checkAndUpdate(); @@ -132,7 +132,7 @@ final class HttpProfileResponseData { /// For example, the map /// /// ```dart - /// {'Foo': ['Bar', 'Baz']}); + /// {'Foo': ['Bar', 'Baz']} /// ``` /// /// represents the headers