From bf19244c55f628d1db15963c0805f152bf7e8eb0 Mon Sep 17 00:00:00 2001 From: Nikolas Rimikis Date: Fri, 29 Dec 2023 16:42:00 +0100 Subject: [PATCH] feat(dynamite): add @nodoc comment to avoid doc comments on interface classes Signed-off-by: Nikolas Rimikis --- .../dynamite/dynamite/lib/src/builder/generate_schemas.dart | 2 ++ .../dynamite/dynamite/lib/src/builder/resolve_interface.dart | 1 + 2 files changed, 3 insertions(+) diff --git a/packages/dynamite/dynamite/lib/src/builder/generate_schemas.dart b/packages/dynamite/dynamite/lib/src/builder/generate_schemas.dart index 1b6aa730996..4a1b7d24557 100644 --- a/packages/dynamite/dynamite/lib/src/builder/generate_schemas.dart +++ b/packages/dynamite/dynamite/lib/src/builder/generate_schemas.dart @@ -23,6 +23,8 @@ Iterable generateSchemas( if (result is TypeResultBase || result.isTypeDef) { yield TypeDef( (final b) => b + // TODO: handle typeDefs. + ..docs.add('/// @nodoc') ..name = identifier ..definition = refer(result.dartType.name), ); diff --git a/packages/dynamite/dynamite/lib/src/builder/resolve_interface.dart b/packages/dynamite/dynamite/lib/src/builder/resolve_interface.dart index 8c165184c4d..55a49d861ad 100644 --- a/packages/dynamite/dynamite/lib/src/builder/resolve_interface.dart +++ b/packages/dynamite/dynamite/lib/src/builder/resolve_interface.dart @@ -102,6 +102,7 @@ Spec buildInterface( return Class((final b) { b + ..docs.add('/// @nodoc') ..abstract = true ..modifier = ClassModifier.interface ..name = className