clean(packages): apply dart fix (close #106)
continuous-integration/drone/push Build is passing

This commit was merged in pull request #107.
This commit is contained in:
AN12345
2022-12-13 13:52:49 -05:00
parent 3c8ff373a1
commit 17ff0f8ba1
74 changed files with 222 additions and 287 deletions
@@ -42,22 +42,21 @@ class MiddlewareRequest {
MiddlewareRequest copyWith({
UnfreezedRequest? unfreezedRequest,
}) {
return MiddlewareRequest(
unfreezedRequest: unfreezedRequest ?? this.unfreezedRequest,
);
}
}) =>
MiddlewareRequest(
unfreezedRequest: unfreezedRequest ?? this.unfreezedRequest,
);
void modifyRequest(UnfreezedRequest unfreezedRequest) {
String? _body;
String? body;
if (unfreezedRequest.body != null) {
final body = unfreezedRequest.body;
var body = unfreezedRequest.body;
if (body is String) {
_body = body;
body = body;
} else if (body is List) {
_body = String.fromCharCodes(body.cast<int>());
body = String.fromCharCodes(body.cast<int>());
} else if (body is Map) {
_body = Convert.mapToQuery(body.cast<String, String>());
body = Convert.mapToQuery(body.cast<String, String>());
}
}
_httpRequest = RequestUtils.copyRequestWith(
@@ -65,7 +64,7 @@ class MiddlewareRequest {
method: unfreezedRequest.method,
url: unfreezedRequest.url,
headers: unfreezedRequest.headers,
body: _body,
body: body,
) as Request;
if (unfreezedRequest.encoding != null) {
_httpRequest.encoding = unfreezedRequest.encoding!;