Skip to content

Commit 427ea30

Browse files
committed
Used lints
1 parent 3a26def commit 427ea30

File tree

4 files changed

+20
-20
lines changed

4 files changed

+20
-20
lines changed

pkgs/http/lib/src/multipart_request.dart

+5-5
Original file line numberDiff line numberDiff line change
@@ -162,14 +162,14 @@ class MultipartRequest extends BaseRequest {
162162

163163
@override
164164
String? get cache {
165-
if(this._cache != null){
166-
return this._cache;
165+
if(_cache != null){
166+
return _cache;
167167
}
168-
else return super.cache;
168+
return super.cache;
169169
}
170170

171171
String? _cache;
172172
set cache(String? cacheType){
173-
this._cache = cacheType!;
173+
_cache = cacheType!;
174174
}
175-
}
175+
}

pkgs/http/lib/src/request.dart

+4-4
Original file line numberDiff line numberDiff line change
@@ -184,14 +184,14 @@ class Request extends BaseRequest {
184184

185185
@override
186186
String? get cache {
187-
if(this._cache != null){
188-
return this._cache;
187+
if(_cache != null){
188+
return _cache;
189189
}
190-
else return super.cache;
190+
return super.cache;
191191
}
192192

193193
String? _cache;
194194
set cache(String? cacheType){
195-
this._cache = cacheType!;
195+
_cache = cacheType!;
196196
}
197197
}

pkgs/http/lib/src/streamed_request.dart

+4-4
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,14 @@ class StreamedRequest extends BaseRequest {
5555

5656
@override
5757
String? get cache {
58-
if(this._cache != null){
59-
return this._cache;
58+
if(_cache != null){
59+
return _cache;
6060
}
61-
else return super.cache;
61+
return super.cache;
6262
}
6363

6464
String? _cache;
6565
set cache(String? cacheType){
66-
this._cache = cacheType!;
66+
_cache = cacheType!;
6767
}
6868
}

pkgs/http/lib/src/utils.dart

+7-7
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,11 @@ Stream<T> onDone<T>(Stream<T> stream, void Function() onDone) =>
7272
/// Caching utilities types for using cache for any http request.
7373
///
7474
/// For more references, check (Caching types)[https://developer.mozilla.org/en-US/docs/Web/API/Request/cache]
75-
mixin HttpCacheUtils{
76-
static const String defaultType = "default";
77-
static const String reloadType = "reload";
78-
static const String noStoringType = "no-store";
79-
static const String noCachingType = "no-cache";
80-
static const String forceCachingType = "force-cache";
81-
static const String onlyIfCachedType = "only-if-cached";
75+
mixin HttpCacheUtils {
76+
static const String defaultType = 'default';
77+
static const String reloadType = 'reload';
78+
static const String noStoringType = 'no-store';
79+
static const String noCachingType = 'no-cache';
80+
static const String forceCachingType = 'force-cache';
81+
static const String onlyIfCachedType = 'only-if-cached';
8282
}

0 commit comments

Comments
 (0)