[License] Enable prefer_collection_literals lint

This commit is contained in:
Chris Bracken
2018-12-20 12:18:31 -08:00
parent dcdbeeba3e
commit ddbe4bf456
2 changed files with 2 additions and 3 deletions

View File

@@ -48,6 +48,7 @@ linter:
- overridden_fields
- package_prefixed_library_names
- prefer_asserts_in_initializer_lists
- prefer_collection_literals
- prefer_const_declarations
- prefer_equal_for_default_values
- prefer_final_fields

View File

@@ -2,9 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:collection';
Map<Key, dynamic> _cache = LinkedHashMap<Key, dynamic>();
Map<Key, dynamic> _cache = <Key, dynamic>{};
const int _maxSize = 10;
T cache<T>(Key key, T getter()) {