Skip to content

Commit 661e3e0

Browse files
committed
Rename to nameToCategory
1 parent c3ba349 commit 661e3e0

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

lib/src/model.dart

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4558,14 +4558,14 @@ class Package extends LibraryContainer implements Comparable<Package>, Privacy {
45584558
String _name;
45594559
PackageGraph _packageGraph;
45604560

4561-
final Map<String, Category> _categoryToContainer = {};
4561+
final Map<String, Category> _nameToCategory = {};
45624562
Package(this._name, this._packageGraph);
45634563

45644564
/// Return true if the code has defined non-default categories for libraries
45654565
/// in this package.
45664566
bool get hasCategories => categories.isNotEmpty;
45674567

4568-
LibraryContainer get defaultCategory => categoryToContainer[null];
4568+
LibraryContainer get defaultCategory => nameToCategory[null];
45694569

45704570
bool _isPublic;
45714571
@override
@@ -4585,24 +4585,24 @@ class Package extends LibraryContainer implements Comparable<Package>, Privacy {
45854585
@override
45864586
List<Library> get publicLibraries => super.publicLibraries;
45874587

4588-
// A map of category name to the category itself.
4589-
Map<String, Category> get categoryToContainer {
4590-
if (_categoryToContainer.isEmpty) {
4591-
_categoryToContainer[null] = new Category(null, this, dartdocOptions);
4588+
/// A map of category name to the category itself.
4589+
Map<String, Category> get nameToCategory {
4590+
if (_nameToCategory.isEmpty) {
4591+
_nameToCategory[null] = new Category(null, this, dartdocOptions);
45924592
for (Library lib in libraries) {
45934593
String category = lib.category;
4594-
_categoryToContainer.putIfAbsent(
4594+
_nameToCategory.putIfAbsent(
45954595
category, () => new Category(category, this, dartdocOptions));
4596-
_categoryToContainer[category]._libraries.add(lib);
4596+
_nameToCategory[category]._libraries.add(lib);
45974597
}
45984598
}
4599-
return _categoryToContainer;
4599+
return _nameToCategory;
46004600
}
46014601

46024602
List<LibraryContainer> _categories;
46034603
List<LibraryContainer> get categories {
46044604
if (_categories == null) {
4605-
_categories = categoryToContainer.values
4605+
_categories = nameToCategory.values
46064606
.where((c) => c.name != null)
46074607
.toList()
46084608
..sort();

0 commit comments

Comments
 (0)