Skip to content

Commit 4299d94

Browse files
jakemac53lrhn
authored andcommitted
remove unnecessary check from macro example code
1 parent b26dd04 commit 4299d94

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

working/macros/example/lib/injectable.dart

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -388,9 +388,6 @@ macro class Component implements ClassDeclarationsMacro, ClassDefinitionMacro {
388388
// If we have no explicit provider from any module, check if the type is
389389
// injectable.
390390
final clazz = await builder.typeDeclarationOf(type);
391-
if (clazz is! IntrospectableType) {
392-
throw UnsupportedError('Only classes are automatically injectable.');
393-
}
394391
for (final method in await builder.methodsOf(clazz)) {
395392
if (!method.isStatic) continue;
396393
final returnType = method.returnType;

0 commit comments

Comments
 (0)