Skip to content

Commit

Permalink
Fix #6 The method 'HttpHeadersWrapper.set' has fewer named arguments …
Browse files Browse the repository at this point in the history
…than those of overridden method 'HttpHeaders.set'. [Dart 2.8]
  • Loading branch information
jumperchen committed May 7, 2020
1 parent 27c8218 commit 22c89ea
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Rikulo Commons Changes
### 4.1.0

* Fix [#6](https://github.com/rikulo/commons/issues/6) The method 'HttpHeadersWrapper.set' has fewer named arguments than those of overridden method 'HttpHeaders.set'. [Dart 2.8]

### 4.0.1+1

* Limit Dart SDK version for Dart 2.8 version breaking change.
Expand Down
11 changes: 7 additions & 4 deletions lib/src/io/http_wrapper.dart
Original file line number Diff line number Diff line change
Expand Up @@ -374,14 +374,17 @@ class HttpHeadersWrapper implements HttpHeaders {
List<String> operator[](String name) => origin[name];
@override
String value(String name) => origin.value(name);

@override
void add(String name, Object value) {
origin.add(name, value);
void add(String name, Object value, {bool preserveHeaderCase = false}) {
origin.add(name, value, preserveHeaderCase: preserveHeaderCase);
}

@override
void set(String name, Object value) {
origin.set(name, value);
void set(String name, Object value, {bool preserveHeaderCase = false}) {
origin.set(name, value, preserveHeaderCase: preserveHeaderCase);
}

@override
void remove(String name, Object value) {
origin.remove(name, value);
Expand Down
4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: rikulo_commons
version: 4.0.1+1
version: 4.1.0
description: Common reusable Dart classes and utilities.
authors:
- Tom Yeh <tomyeh@rikulo.org>
Expand All @@ -18,4 +18,4 @@ dev_dependencies:
test: any

environment:
sdk: '>=2.5.0 <2.8.0'
sdk: '>=2.8.0 <3.0.0'

0 comments on commit 22c89ea

Please sign in to comment.