Skip to content

Commit a2ebde3

Browse files
committed
fix: make default constructor identifier field private
1 parent b26b7c2 commit a2ebde3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/src/lints/avoid_using_api/avoid_using_api_linter.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class AvoidUsingApiLinter {
2020
});
2121

2222
/// The identifier for the default constructor
23-
static const String defaultConstructorIdentifier = '()';
23+
static const String _defaultConstructorIdentifier = '()';
2424

2525
/// Access to the resolver for this lint context
2626
final CustomLintResolver resolver;
@@ -194,7 +194,7 @@ class AvoidUsingApiLinter {
194194
String className,
195195
String source,
196196
) {
197-
if (identifier == defaultConstructorIdentifier) {
197+
if (identifier == _defaultConstructorIdentifier) {
198198
_banDefaultConstructor(className, source, entryCode);
199199
return;
200200
}
@@ -348,7 +348,7 @@ class AvoidUsingApiLinter {
348348
context.registry.addInstanceCreationExpression((node) {
349349
String? expectedConstructorName;
350350

351-
if (identifier != defaultConstructorIdentifier) {
351+
if (identifier != _defaultConstructorIdentifier) {
352352
expectedConstructorName = identifier;
353353
}
354354

0 commit comments

Comments
 (0)