diff --git a/lib/src/generator/templates.renderers.dart b/lib/src/generator/templates.renderers.dart index d32ce99318..a0b5259a23 100644 --- a/lib/src/generator/templates.renderers.dart +++ b/lib/src/generator/templates.renderers.dart @@ -8795,13 +8795,6 @@ class _Renderer_Categorization extends RendererBase { self.renderSimpleVariable(c, remainingNames, 'bool'), getBool: (CT_ c) => c.hasCategoryNames == true, ), - 'hasDisplayedCategories': Property( - getValue: (CT_ c) => c.hasDisplayedCategories, - renderVariable: (CT_ c, Property self, - List remainingNames) => - self.renderSimpleVariable(c, remainingNames, 'bool'), - getBool: (CT_ c) => c.hasDisplayedCategories == true, - ), 'hasImage': Property( getValue: (CT_ c) => c.hasImage, renderVariable: (CT_ c, Property self, diff --git a/lib/src/model/categorization.dart b/lib/src/model/categorization.dart index 3119eb1e18..20cecd1d12 100644 --- a/lib/src/model/categorization.dart +++ b/lib/src/model/categorization.dart @@ -117,8 +117,6 @@ abstract class Categorization implements ModelElement { return categories.where((c) => c.isDocumented); } - bool get hasDisplayedCategories => displayedCategories.isNotEmpty; - /// True if categories, subcategories, a documentation icon, or samples were /// declared. bool get hasCategorization { diff --git a/lib/templates/md/_categorization.md b/lib/templates/md/_categorization.md index 3be48584c3..53bd4ccccd 100644 --- a/lib/templates/md/_categorization.md +++ b/lib/templates/md/_categorization.md @@ -1,6 +1,6 @@ -{{#hasDisplayedCategories}} +{{#hasCategoryNames}} Categories: {{#displayedCategories}} {{{categoryLabel}}} {{/displayedCategories}} -{{/hasDisplayedCategories}} +{{/hasCategoryNames}}