Skip to content

Commit 784a245

Browse files
committed
feat: add exceptions parameter to MustCallInConstructor annotation
1 parent ffdceb2 commit 784a245

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

lib/src/must_call_in_constructor.dart

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,16 @@ class MustCallInConstructor {
2424
/// Otherwise, it applies to the class even if it's abstract.
2525
final bool concreteOnly;
2626

27+
/// A list of types that are exempt from this requirement.
28+
/// If the class using the mixin is a subtype of any of these types,
29+
/// the requirement is considered satisfied.
30+
final List<Type> exceptions;
31+
2732
/// {@macro hook_installer}
28-
const MustCallInConstructor({this.concreteOnly = true});
33+
const MustCallInConstructor({
34+
this.concreteOnly = true,
35+
this.exceptions = const [],
36+
});
2937
}
3038

3139
/// {@macro hook_installer}

0 commit comments

Comments
 (0)