From 1f0d70ba14efc6d65f2f89f7cca18c43807f9b67 Mon Sep 17 00:00:00 2001 From: Parker Lougheed Date: Sun, 15 Oct 2023 12:08:00 -0500 Subject: [PATCH] Enable and fix the no_literal_bool_comparisons lint --- analysis_options.yaml | 1 + .../templates.aot_renderers_for_html.dart | 432 ++-- .../templates.aot_renderers_for_md.dart | 232 +- .../templates.runtime_renderers.dart | 2281 ++++++++--------- lib/src/model/documentable.dart | 2 +- lib/src/model/model_element.dart | 2 +- lib/src/model/package.dart | 2 +- lib/src/tool_definition.dart | 2 +- .../mustachio/foo.aot_renderers_for_html.dart | 4 +- test/mustachio/foo.aot_renderers_for_md.dart | 4 +- test/mustachio/foo.runtime_renderers.dart | 11 +- tool/mustachio/codegen_aot_compiler.dart | 6 +- tool/mustachio/codegen_runtime_renderer.dart | 10 +- 13 files changed, 1394 insertions(+), 1595 deletions(-) diff --git a/analysis_options.yaml b/analysis_options.yaml index d97f92c4cd..df3f1a4a9a 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -27,6 +27,7 @@ linter: - directives_ordering - invalid_case_patterns - no_adjacent_strings_in_list + - no_literal_bool_comparisons - omit_local_variable_types - only_throw_errors - package_api_docs diff --git a/lib/src/generator/templates.aot_renderers_for_html.dart b/lib/src/generator/templates.aot_renderers_for_html.dart index cca6d0d252..2118fe92e3 100644 --- a/lib/src/generator/templates.aot_renderers_for_html.dart +++ b/lib/src/generator/templates.aot_renderers_for_html.dart @@ -56,7 +56,7 @@ String renderCategory(CategoryTemplateData context0) { '''); buffer.write(_renderCategory_partial_documentation_1(context1)); buffer.writeln(); - if (context1.hasPublicLibraries == true) { + if (context1.hasPublicLibraries) { buffer.writeln(); buffer.write('''
@@ -74,7 +74,7 @@ String renderCategory(CategoryTemplateData context0) {
'''); } buffer.writeln(); - if (context1.hasPublicClasses == true) { + if (context1.hasPublicClasses) { buffer.writeln(); buffer.write('''
@@ -92,7 +92,7 @@ String renderCategory(CategoryTemplateData context0) {
'''); } buffer.writeln(); - if (context1.hasPublicMixins == true) { + if (context1.hasPublicMixins) { buffer.writeln(); buffer.write('''
@@ -110,7 +110,7 @@ String renderCategory(CategoryTemplateData context0) {
'''); } buffer.writeln(); - if (context1.hasPublicExtensions == true) { + if (context1.hasPublicExtensions) { buffer.writeln(); buffer.write('''
@@ -128,7 +128,7 @@ String renderCategory(CategoryTemplateData context0) {
'''); } buffer.writeln(); - if (context1.hasPublicConstants == true) { + if (context1.hasPublicConstants) { buffer.writeln(); buffer.write('''
@@ -146,7 +146,7 @@ String renderCategory(CategoryTemplateData context0) {
'''); } buffer.writeln(); - if (context1.hasPublicProperties == true) { + if (context1.hasPublicProperties) { buffer.writeln(); buffer.write('''
@@ -164,7 +164,7 @@ String renderCategory(CategoryTemplateData context0) {
'''); } buffer.writeln(); - if (context1.hasPublicFunctions == true) { + if (context1.hasPublicFunctions) { buffer.writeln(); buffer.write('''
@@ -182,7 +182,7 @@ String renderCategory(CategoryTemplateData context0) {
'''); } buffer.writeln(); - if (context1.hasPublicEnums == true) { + if (context1.hasPublicEnums) { buffer.writeln(); buffer.write('''
@@ -200,7 +200,7 @@ String renderCategory(CategoryTemplateData context0) {
'''); } buffer.writeln(); - if (context1.hasPublicTypedefs == true) { + if (context1.hasPublicTypedefs) { buffer.writeln(); buffer.write('''
@@ -218,7 +218,7 @@ String renderCategory(CategoryTemplateData context0) {
'''); } buffer.writeln(); - if (context1.hasPublicExceptions == true) { + if (context1.hasPublicExceptions) { buffer.writeln(); buffer.write('''
@@ -309,7 +309,7 @@ String renderClass(ClassTemplateData context0) { buffer.write('\n '); buffer.write(_renderClass_partial_documentation_4(context2)); buffer.writeln(); - if (context2.hasModifiers == true) { + if (context2.hasModifiers) { buffer.writeln(); buffer.write('''
@@ -321,7 +321,7 @@ String renderClass(ClassTemplateData context0) { buffer.write('\n '); buffer.write(_renderClass_partial_mixed_in_types_7(context2)); buffer.writeln(); - if (context2.hasPublicImplementors == true) { + if (context2.hasPublicImplementors) { buffer.writeln(); buffer.write('''
Implementers
@@ -339,7 +339,7 @@ String renderClass(ClassTemplateData context0) { '''); } buffer.writeln(); - if (context2.hasPotentiallyApplicableExtensions == true) { + if (context2.hasPotentiallyApplicableExtensions) { buffer.writeln(); buffer.write('''
Available Extensions
@@ -366,11 +366,11 @@ String renderClass(ClassTemplateData context0) { buffer.write('\n\n '); buffer.write(_renderClass_partial_constructors_9(context2)); buffer.writeln(); - if (context2.hasPublicInstanceFields == true) { + if (context2.hasPublicInstanceFields) { buffer.writeln(); buffer.write('''
@@ -459,19 +459,19 @@ String renderConstructor(ConstructorTemplateData context0) {
'''); buffer.write(_renderConstructor_partial_annotations_3(context2)); - if (context2.isConst == true) { + if (context2.isConst) { buffer.write('''const'''); } buffer.writeln(); buffer.write(''' '''); buffer.write(context2.nameWithGenerics); buffer.write('''('''); - if (context2.hasParameters == true) { + if (context2.hasParameters) { buffer.write(context2.linkedParamsLines); } buffer.write(''') @@ -549,7 +549,7 @@ String renderEnum(EnumTemplateData context0) { buffer.write('\n '); buffer.write(_renderEnum_partial_documentation_4(context2)); buffer.writeln(); - if (context2.hasModifiers == true) { + if (context2.hasModifiers) { buffer.writeln(); buffer.write('''
@@ -570,7 +570,7 @@ String renderEnum(EnumTemplateData context0) { buffer.write('\n\n '); buffer.write(_renderEnum_partial_constructors_9(context2)); buffer.writeln(); - if (context2.hasPublicEnumValues == true) { + if (context2.hasPublicEnumValues) { buffer.writeln(); buffer.write('''
@@ -588,14 +588,14 @@ String renderEnum(EnumTemplateData context0) {
'''); } buffer.writeln(); - if (context2.hasPublicInstanceFields == true) { + if (context2.hasPublicInstanceFields) { buffer.writeln(); buffer.write('''
(ExtensionTemplateData context0) { buffer.write('''
'''); - if (context2.hasPublicInstanceFields == true) { + if (context2.hasPublicInstanceFields) { buffer.writeln(); buffer.write('''
@@ -895,12 +895,12 @@ String renderIndex(PackageTemplateData context0) { buffer.writeln(); buffer.write('''
'''); - if (context3.isFirstPackage == true) { + if (context3.isFirstPackage) { buffer.writeln(); buffer.write('''

Libraries

'''); } - if (context3.isFirstPackage != true) { + if (!context3.isFirstPackage) { buffer.writeln(); buffer.write('''

'''); @@ -1001,7 +1001,7 @@ String renderLibrary(LibraryTemplateData context0) { buffer.write(_renderLibrary_partial_documentation_4(context2)); buffer.writeln(); var context3 = context0.library; - if (context3.hasPublicClasses == true) { + if (context3.hasPublicClasses) { buffer.writeln(); buffer.write('''
@@ -1021,7 +1021,7 @@ String renderLibrary(LibraryTemplateData context0) { } buffer.writeln(); var context7 = context0.library; - if (context7.hasPublicMixins == true) { + if (context7.hasPublicMixins) { buffer.writeln(); buffer.write('''
@@ -1041,7 +1041,7 @@ String renderLibrary(LibraryTemplateData context0) { } buffer.writeln(); var context11 = context0.library; - if (context11.hasPublicExtensions == true) { + if (context11.hasPublicExtensions) { buffer.writeln(); buffer.write('''
@@ -1061,7 +1061,7 @@ String renderLibrary(LibraryTemplateData context0) { } buffer.writeln(); var context15 = context0.library; - if (context15.hasPublicConstants == true) { + if (context15.hasPublicConstants) { buffer.writeln(); buffer.write('''
@@ -1081,7 +1081,7 @@ String renderLibrary(LibraryTemplateData context0) { } buffer.writeln(); var context19 = context0.library; - if (context19.hasPublicProperties == true) { + if (context19.hasPublicProperties) { buffer.writeln(); buffer.write('''
@@ -1101,7 +1101,7 @@ String renderLibrary(LibraryTemplateData context0) { } buffer.writeln(); var context23 = context0.library; - if (context23.hasPublicFunctions == true) { + if (context23.hasPublicFunctions) { buffer.writeln(); buffer.write('''
@@ -1121,7 +1121,7 @@ String renderLibrary(LibraryTemplateData context0) { } buffer.writeln(); var context27 = context0.library; - if (context27.hasPublicEnums == true) { + if (context27.hasPublicEnums) { buffer.writeln(); buffer.write('''
@@ -1141,7 +1141,7 @@ String renderLibrary(LibraryTemplateData context0) { } buffer.writeln(); var context31 = context0.library; - if (context31.hasPublicTypedefs == true) { + if (context31.hasPublicTypedefs) { buffer.writeln(); buffer.write('''
@@ -1161,7 +1161,7 @@ String renderLibrary(LibraryTemplateData context0) { } buffer.writeln(); var context35 = context0.library; - if (context35.hasPublicExceptions == true) { + if (context35.hasPublicExceptions) { buffer.writeln(); buffer.write('''
@@ -1319,12 +1319,12 @@ String renderMixin(MixinTemplateData context0) { buffer.write('\n '); buffer.write(_renderMixin_partial_documentation_4(context2)); buffer.writeln(); - if (context2.hasModifiers == true) { + if (context2.hasModifiers) { buffer.writeln(); buffer.write('''
'''); - if (context2.hasPublicSuperclassConstraints == true) { + if (context2.hasPublicSuperclassConstraints) { buffer.writeln(); buffer.write('''
Superclass Constraints
@@ -1346,7 +1346,7 @@ String renderMixin(MixinTemplateData context0) { buffer.write('\n '); buffer.write(_renderMixin_partial_interfaces_6(context2)); buffer.writeln(); - if (context2.hasPublicImplementors == true) { + if (context2.hasPublicImplementors) { buffer.writeln(); buffer.write('''
Mixin Applications
@@ -1373,11 +1373,11 @@ String renderMixin(MixinTemplateData context0) {
'''); } buffer.writeln(); - if (context2.hasPublicInstanceFields == true) { + if (context2.hasPublicInstanceFields) { buffer.writeln(); buffer.write('''
@@ -1459,7 +1459,7 @@ String renderProperty(PropertyTemplateData context0) { buffer.write('''

'''); buffer.writeln(); var context2 = context0.self; - if (context2.hasNoGetterSetter == true) { + if (context2.hasNoGetterSetter) { buffer.writeln(); buffer.write('''
@@ -1480,13 +1480,13 @@ String renderProperty(PropertyTemplateData context0) { buffer.write(_renderProperty_partial_source_code_7(context2)); } buffer.writeln(); - if (context2.hasGetterOrSetter == true) { - if (context2.hasGetter == true) { + if (context2.hasGetterOrSetter) { + if (context2.hasGetter) { buffer.write('\n '); buffer.write(_renderProperty_partial_accessor_getter_8(context2)); } buffer.writeln(); - if (context2.hasSetter == true) { + if (context2.hasSetter) { buffer.write('\n '); buffer.write(_renderProperty_partial_accessor_setter_9(context2)); } @@ -1558,8 +1558,8 @@ String renderSidebarForContainer( buffer.write('''
    '''); var context1 = context0.container; buffer.writeln(); - if (context1.isClassOrEnum == true) { - if (context1.hasPublicConstructors == true) { + if (context1.isClassOrEnum) { + if (context1.hasPublicConstructors) { buffer.writeln(); buffer.write('''
  1. @@ -1618,7 +1618,7 @@ String renderSidebarForContainer( buffer.writeln(); buffer.write(''' '''); @@ -1627,11 +1627,11 @@ String renderSidebarForContainer( } } buffer.writeln(); - if (context1.hasPublicInstanceMethods == true) { + if (context1.hasPublicInstanceMethods) { buffer.writeln(); buffer.write('''
  2. '''); @@ -1651,11 +1651,11 @@ String renderSidebarForContainer( } } buffer.writeln(); - if (context1.hasPublicInstanceOperators == true) { + if (context1.hasPublicInstanceOperators) { buffer.writeln(); buffer.write('''
  3. '''); @@ -1676,8 +1676,8 @@ String renderSidebarForContainer( } } buffer.writeln(); - if (context1.isExtension == true) { - if (context1.hasPublicInstanceFields == true) { + if (context1.isExtension) { + if (context1.hasPublicInstanceFields) { buffer.writeln(); buffer.write('''
  4. @@ -1990,12 +1990,12 @@ String renderTopLevelProperty(TopLevelPropertyTemplateData context0) { buffer.write(_renderTopLevelProperty_partial_source_code_8(context1)); } buffer.writeln(); - if (context1.hasExplicitGetter == true) { + if (context1.hasExplicitGetter) { buffer.write('\n '); buffer.write(_renderTopLevelProperty_partial_accessor_getter_9(context1)); } buffer.writeln(); - if (context1.hasExplicitSetter == true) { + if (context1.hasExplicitSetter) { buffer.write('\n '); buffer.write(_renderTopLevelProperty_partial_accessor_setter_10(context1)); } @@ -2123,12 +2123,12 @@ String _renderCategory_partial_callable_7(ModelFunctionTyped context2) { buffer.write('''
    '''); @@ -2149,7 +2149,7 @@ String _renderCategory_partial_callable_7(ModelFunctionTyped context2) { buffer.write('''
    @@ -2189,7 +2189,7 @@ String _renderCategory_partial_sidebar_for_category_11( final buffer = StringBuffer(); buffer.write('''
      '''); var context1 = context0.self; - if (context1.hasPublicLibraries == true) { + if (context1.hasPublicLibraries) { buffer.writeln(); buffer.write('''
    1. '''); @@ -2787,7 +2787,7 @@ String _renderLibrary_partial_callable_9(ModelFunctionTyped context3) { buffer.write(''' @@ -2850,7 +2850,7 @@ String _renderMethod_partial_callable_multiline_3(Method context1) { context1)); buffer.write(context1.genericParameters); buffer.write('''('''); - if (context1.hasParameters == true) { + if (context1.hasParameters) { buffer.write(context1.linkedParamsLines); } buffer.write(''') @@ -2902,7 +2902,7 @@ String _renderMixin_partial_super_chain_5(Mixin context1) => String _renderMixin_partial_interfaces_6(Mixin context1) { final buffer = StringBuffer(); - if (context1.hasPublicInterfaces == true) { + if (context1.hasPublicInterfaces) { buffer.writeln(); buffer.write('''
      Implemented types
      @@ -3070,9 +3070,9 @@ String _renderTypedef_partial_categorization_3(Typedef context1) => String _renderTypedef_partial_typedef_multiline_4(Typedef context1) { final buffer = StringBuffer(); - if (context1.isCallable == true) { + if (context1.isCallable) { var context2 = context1.asCallable; - if (context2.hasAnnotations == true) { + if (context2.hasAnnotations) { buffer.writeln(); buffer.write('''
      @@ -3090,11 +3090,11 @@ String _renderTypedef_partial_typedef_multiline_4(Typedef context1) {
    '''); } - if (context2.isConst == true) { + if (context2.isConst) { buffer.write('''const '''); } buffer.write(''''''); @@ -3106,7 +3106,7 @@ String _renderTypedef_partial_typedef_multiline_4(Typedef context1) { buffer.write(context2.modelType.linkedName); buffer.write(''''''); } - if (context1.isCallable != true) { + if (!context1.isCallable) { buffer.write('\n '); buffer.write( __renderTypedef_partial_typedef_multiline_4_partial_type_multiline_0( @@ -3120,7 +3120,7 @@ String _renderTypedef_partial_typedef_multiline_4(Typedef context1) { String __renderTypedef_partial_typedef_multiline_4_partial_type_multiline_0( Typedef context1) { final buffer = StringBuffer(); - if (context1.hasAnnotations == true) { + if (context1.hasAnnotations) { buffer.writeln(); buffer.write('''
    @@ -3176,7 +3176,7 @@ String _deduplicated_lib_templates_html__head_html(TemplateDataBase context0) { '''); - if (context0.includeVersion == true) { + if (context0.includeVersion) { buffer.writeln(); buffer.write(''' '''); } buffer.writeln(); - if (context0.useBaseHref == true) { + if (context0.useBaseHref) { var context2 = context0.htmlBase; buffer.writeln(); buffer.write(''' @@ -3221,17 +3221,17 @@ String _deduplicated_lib_templates_html__head_html(TemplateDataBase context0) { buffer.writeln(); buffer.write(''' @@ -3274,21 +3274,21 @@ String _deduplicated_lib_templates_html__head_html(TemplateDataBase context0) { buffer.write(context6.href); buffer.write('''">'''); buffer.writeEscaped(context6.name); - if (context6.hasGenericParameters == true) { + if (context6.hasGenericParameters) { buffer.write(''''''); buffer.write(context6.genericParameters); buffer.write(''''''); } buffer.write('''
  5. '''); } - if (context0.hasHomepage != true) { + if (!context0.hasHomepage) { buffer.writeln(); buffer.write('''
  6. '''); buffer.write(context0.layoutTitle); buffer.write('''
  7. '''); } - if (context0.hasHomepage == true) { + if (context0.hasHomepage) { buffer.writeln(); buffer.write('''
  8. @@ -3355,7 +3355,7 @@ String _deduplicated_lib_templates_html__library_html(Library context0) { buffer.write('''
    '''); - if (context0.isDocumented == true) { + if (context0.isDocumented) { buffer.write(context0.oneLineDoc); } buffer.writeln(); @@ -3369,7 +3369,7 @@ String _deduplicated_lib_templates_html__library_html(Library context0) { String __deduplicated_lib_templates_html__library_html_partial_categorization_0( Library context0) { final buffer = StringBuffer(); - if (context0.hasCategoryNames == true) { + if (context0.hasCategoryNames) { var context1 = context0.displayedCategories; for (var context2 in context1) { buffer.write('\n '); @@ -3384,7 +3384,7 @@ String __deduplicated_lib_templates_html__library_html_partial_categorization_0( String _deduplicated_lib_templates_html__categorization_html( ModelElement context0) { final buffer = StringBuffer(); - if (context0.hasCategoryNames == true) { + if (context0.hasCategoryNames) { var context1 = context0.displayedCategories; for (var context2 in context1) { buffer.write('\n '); @@ -3402,7 +3402,7 @@ String _deduplicated_lib_templates_html__container_html(Container context0) { buffer.writeEscaped(context0.htmlId); buffer.write('''"> '''); @@ -3430,7 +3430,7 @@ String __deduplicated_lib_templates_html__container_html_partial_categorization_0( Container context0) { final buffer = StringBuffer(); - if (context0.hasCategoryNames == true) { + if (context0.hasCategoryNames) { var context1 = context0.displayedCategories; for (var context2 in context1) { buffer.write('\n '); @@ -3448,7 +3448,7 @@ String _deduplicated_lib_templates_html__extension_html(Extension context0) { buffer.writeEscaped(context0.htmlId); buffer.write('''"> '''); @@ -3476,7 +3476,7 @@ String __deduplicated_lib_templates_html__extension_html_partial_categorization_0( Extension context0) { final buffer = StringBuffer(); - if (context0.hasCategoryNames == true) { + if (context0.hasCategoryNames) { var context1 = context0.displayedCategories; for (var context2 in context1) { buffer.write('\n '); @@ -3494,22 +3494,22 @@ String _deduplicated_lib_templates_html__constant_html( buffer.write('''
    '''); - if (context0.isEnumValue == true) { + if (context0.isEnumValue) { buffer.writeln(); buffer.write(''' '''); buffer.write(context0.name); buffer.write(''''''); } - if (context0.isEnumValue != true) { + if (!context0.isEnumValue) { buffer.writeln(); buffer.write(''' '''); @@ -3535,7 +3535,7 @@ String _deduplicated_lib_templates_html__constant_html( buffer.write( __deduplicated_lib_templates_html__constant_html_partial_attributes_1( context0)); - if (context0.hasConstantValueForDisplay == true) { + if (context0.hasConstantValueForDisplay) { buffer.writeln(); buffer.write('''
    @@ -3556,7 +3556,7 @@ String __deduplicated_lib_templates_html__constant_html_partial_categorization_0( GetterSetterCombo context0) { final buffer = StringBuffer(); - if (context0.hasCategoryNames == true) { + if (context0.hasCategoryNames) { var context1 = context0.displayedCategories; for (var context2 in context1) { buffer.write('\n '); @@ -3571,7 +3571,7 @@ String String __deduplicated_lib_templates_html__constant_html_partial_attributes_1( GetterSetterCombo context0) { final buffer = StringBuffer(); - if (context0.hasAttributes == true) { + if (context0.hasAttributes) { buffer.write('''
    '''); buffer.write(context0.attributesAsString); buffer.write('''
    '''); @@ -3584,7 +3584,7 @@ String __deduplicated_lib_templates_html__constant_html_partial_attributes_1( String _deduplicated_lib_templates_html__attributes_html( ModelElement context0) { final buffer = StringBuffer(); - if (context0.hasAttributes == true) { + if (context0.hasAttributes) { buffer.write('''
    '''); buffer.write(context0.attributesAsString); buffer.write('''
    '''); @@ -3600,7 +3600,7 @@ String _deduplicated_lib_templates_html__property_html( buffer.write('''
    @@ -3619,7 +3619,7 @@ String _deduplicated_lib_templates_html__property_html( buffer.write('''
    @@ -3641,7 +3641,7 @@ String __deduplicated_lib_templates_html__property_html_partial_categorization_0( GetterSetterCombo context0) { final buffer = StringBuffer(); - if (context0.hasCategoryNames == true) { + if (context0.hasCategoryNames) { var context1 = context0.displayedCategories; for (var context2 in context1) { buffer.write('\n '); @@ -3656,7 +3656,7 @@ String String __deduplicated_lib_templates_html__property_html_partial_attributes_1( GetterSetterCombo context0) { final buffer = StringBuffer(); - if (context0.hasAttributes == true) { + if (context0.hasAttributes) { buffer.write('''
    '''); buffer.write(context0.attributesAsString); buffer.write('''
    '''); @@ -3668,19 +3668,19 @@ String __deduplicated_lib_templates_html__property_html_partial_attributes_1( String _deduplicated_lib_templates_html__typedef_html(Typedef context0) { final buffer = StringBuffer(); - if (context0.isCallable == true) { + if (context0.isCallable) { var context1 = context0.asCallable; buffer.writeln(); buffer.write('''
    '''); @@ -3700,7 +3700,7 @@ String _deduplicated_lib_templates_html__typedef_html(Typedef context0) { buffer.write('''
    @@ -3714,7 +3714,7 @@ String _deduplicated_lib_templates_html__typedef_html(Typedef context0) { buffer.write(''' '''); } - if (context0.isCallable != true) { + if (!context0.isCallable) { buffer.write('\n '); buffer.write(__deduplicated_lib_templates_html__typedef_html_partial_type_2( context0)); @@ -3727,7 +3727,7 @@ String _deduplicated_lib_templates_html__typedef_html(Typedef context0) { String __deduplicated_lib_templates_html__typedef_html_partial_categorization_0( FunctionTypedef context1) { final buffer = StringBuffer(); - if (context1.hasCategoryNames == true) { + if (context1.hasCategoryNames) { var context2 = context1.displayedCategories; for (var context3 in context2) { buffer.write('\n '); @@ -3742,7 +3742,7 @@ String __deduplicated_lib_templates_html__typedef_html_partial_categorization_0( String __deduplicated_lib_templates_html__typedef_html_partial_attributes_1( FunctionTypedef context1) { final buffer = StringBuffer(); - if (context1.hasAttributes == true) { + if (context1.hasAttributes) { buffer.write('''
    '''); buffer.write(context1.attributesAsString); buffer.write('''
    '''); @@ -3758,12 +3758,12 @@ String __deduplicated_lib_templates_html__typedef_html_partial_type_2( buffer.write('''
    '''); @@ -3785,7 +3785,7 @@ String __deduplicated_lib_templates_html__typedef_html_partial_type_2( buffer.write('''
    @@ -3807,7 +3807,7 @@ String ___deduplicated_lib_templates_html__typedef_html_partial_type_2_partial_categorization_0( Typedef context0) { final buffer = StringBuffer(); - if (context0.hasCategoryNames == true) { + if (context0.hasCategoryNames) { var context1 = context0.displayedCategories; for (var context2 in context1) { buffer.write('\n '); @@ -3823,7 +3823,7 @@ String ___deduplicated_lib_templates_html__typedef_html_partial_type_2_partial_attributes_1( Typedef context0) { final buffer = StringBuffer(); - if (context0.hasAttributes == true) { + if (context0.hasAttributes) { buffer.write('''
    '''); buffer.write(context0.attributesAsString); buffer.write('''
    '''); @@ -3838,12 +3838,12 @@ String _deduplicated_lib_templates_html__type_html(Typedef context0) { buffer.write('''
    '''); @@ -3865,7 +3865,7 @@ String _deduplicated_lib_templates_html__type_html(Typedef context0) { buffer.write('''
    @@ -3886,7 +3886,7 @@ String _deduplicated_lib_templates_html__type_html(Typedef context0) { String __deduplicated_lib_templates_html__type_html_partial_categorization_0( Typedef context0) { final buffer = StringBuffer(); - if (context0.hasCategoryNames == true) { + if (context0.hasCategoryNames) { var context1 = context0.displayedCategories; for (var context2 in context1) { buffer.write('\n '); @@ -3901,7 +3901,7 @@ String __deduplicated_lib_templates_html__type_html_partial_categorization_0( String __deduplicated_lib_templates_html__type_html_partial_attributes_1( Typedef context0) { final buffer = StringBuffer(); - if (context0.hasAttributes == true) { + if (context0.hasAttributes) { buffer.write('''
    '''); buffer.write(context0.attributesAsString); buffer.write('''
    '''); @@ -3941,21 +3941,21 @@ String _deduplicated_lib_templates_html__search_sidebar_html( buffer.write(context4.href); buffer.write('''">'''); buffer.writeEscaped(context4.name); - if (context4.hasGenericParameters == true) { + if (context4.hasGenericParameters) { buffer.write(''''''); buffer.write(context4.genericParameters); buffer.write(''''''); } buffer.write('''
  9. '''); } - if (context0.hasHomepage != true) { + if (!context0.hasHomepage) { buffer.writeln(); buffer.write('''
  10. '''); buffer.write(context0.layoutTitle); buffer.write('''
  11. '''); } - if (context0.hasHomepage == true) { + if (context0.hasHomepage) { buffer.writeln(); buffer.write('''
  12. Topics
  13. '''); @@ -3997,7 +3997,7 @@ String _deduplicated_lib_templates_html__packages_html( buffer.write('''
  14. Libraries
  15. '''); } - if (context2.isFirstPackage != true) { + if (!context2.isFirstPackage) { buffer.writeln(); buffer.write('''
  16. '''); @@ -4047,7 +4047,7 @@ String _deduplicated_lib_templates_html__footer_html( '''); buffer.writeEscaped(context0.defaultPackage.name); - if (context0.hasFooterVersion == true) { + if (context0.hasFooterVersion) { buffer.write('\n '); buffer.writeEscaped(context0.defaultPackage.version); } @@ -4066,12 +4066,12 @@ String _deduplicated_lib_templates_html__footer_html( buffer.writeln(); buffer.write(''' @@ -4092,7 +4092,7 @@ String _deduplicated_lib_templates_html__footer_html( String _deduplicated_lib_templates_html__source_link_html( ModelElement context0) { final buffer = StringBuffer(); - if (context0.hasSourceHref == true) { + if (context0.hasSourceHref) { buffer.writeln(); buffer.write('''