@@ -4558,14 +4558,14 @@ class Package extends LibraryContainer implements Comparable<Package>, Privacy {
4558
4558
String _name;
4559
4559
PackageGraph _packageGraph;
4560
4560
4561
- final Map <String , Category > _categoryToContainer = {};
4561
+ final Map <String , Category > _nameToCategory = {};
4562
4562
Package (this ._name, this ._packageGraph);
4563
4563
4564
4564
/// Return true if the code has defined non-default categories for libraries
4565
4565
/// in this package.
4566
4566
bool get hasCategories => categories.isNotEmpty;
4567
4567
4568
- LibraryContainer get defaultCategory => categoryToContainer [null ];
4568
+ LibraryContainer get defaultCategory => nameToCategory [null ];
4569
4569
4570
4570
bool _isPublic;
4571
4571
@override
@@ -4585,24 +4585,24 @@ class Package extends LibraryContainer implements Comparable<Package>, Privacy {
4585
4585
@override
4586
4586
List <Library > get publicLibraries => super .publicLibraries;
4587
4587
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);
4592
4592
for (Library lib in libraries) {
4593
4593
String category = lib.category;
4594
- _categoryToContainer .putIfAbsent (
4594
+ _nameToCategory .putIfAbsent (
4595
4595
category, () => new Category (category, this , dartdocOptions));
4596
- _categoryToContainer [category]._libraries.add (lib);
4596
+ _nameToCategory [category]._libraries.add (lib);
4597
4597
}
4598
4598
}
4599
- return _categoryToContainer ;
4599
+ return _nameToCategory ;
4600
4600
}
4601
4601
4602
4602
List <LibraryContainer > _categories;
4603
4603
List <LibraryContainer > get categories {
4604
4604
if (_categories == null ) {
4605
- _categories = categoryToContainer .values
4605
+ _categories = nameToCategory .values
4606
4606
.where ((c) => c.name != null )
4607
4607
.toList ()
4608
4608
..sort ();
0 commit comments