Avoid deprecated List() constructor. (#415)

Enable prefer_collection_literals lint.
This commit is contained in:
Vyacheslav Egorov 2020-12-17 10:50:45 +01:00 committed by GitHub
parent c48af638a5
commit ed960c26c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 2 deletions

View File

@ -18,3 +18,4 @@ linter:
- test_types_in_equals
- unrelated_type_equality_checks
- valid_regexps
- prefer_collection_literals

View File

@ -158,7 +158,7 @@ class XhrTransportStream implements GrpcTransportStream {
class XhrClientConnection extends ClientConnection {
final Uri uri;
final Set<XhrTransportStream> _requests = Set<XhrTransportStream>();
final _requests = <XhrTransportStream>{};
XhrClientConnection(this.uri);

View File

@ -23,7 +23,7 @@ class FakeInterceptor implements ClientInterceptor {
int _unary = 0;
int _streaming = 0;
static final List<InterceptorInvocation> _invocations = new List();
static final _invocations = <InterceptorInvocation>[];
FakeInterceptor(this._id);