@@ -111,9 +111,7 @@ abstract class ValueSourceClass
111111
112112 // Base class must have no fields.
113113 if (supertype.element.fields.any (
114- // TODO(davidmorgan): update when support for analyzer 9 is removed.
115- // ignore: deprecated_member_use
116- (field) => ! field.isStatic && ! field.isSynthetic,
114+ (field) => ! field.isStatic && field.isOriginDeclaration,
117115 )) {
118116 return false ;
119117 }
@@ -293,9 +291,7 @@ abstract class ValueSourceClass
293291 element.constructors
294292 .where (
295293 (constructor) =>
296- // TODO(davidmorgan): update when support for analyzer 9 is removed.
297- // ignore: deprecated_member_use
298- ! constructor.isFactory && ! constructor.isSynthetic,
294+ ! constructor.isFactory && constructor.isOriginDeclaration,
299295 )
300296 .map (
301297 (constructor) => parsedLibrary
@@ -322,9 +318,7 @@ abstract class ValueSourceClass
322318 builderElement! .constructors
323319 .where (
324320 (constructor) =>
325- // TODO(davidmorgan): update when support for analyzer 9 is removed.
326- // ignore: deprecated_member_use
327- ! constructor.isFactory && ! constructor.isSynthetic,
321+ ! constructor.isFactory && constructor.isOriginDeclaration,
328322 )
329323 .map (
330324 (constructor) => parsedLibrary
@@ -552,9 +546,7 @@ abstract class ValueSourceClass
552546 GeneratorError (
553547 (b) => b
554548 ..message = 'Make class implement $expectedInterface .'
555- // TODO(davidmorgan): update when support for analyzer 8 is removed.
556- // ignore: deprecated_member_use
557- ..offset = classDeclaration.leftBracket.offset - 1
549+ ..offset = classDeclaration.body.offset - 1
558550 ..length = 0
559551 ..fix = 'implements $expectedInterface ' ,
560552 ),
@@ -683,9 +675,7 @@ abstract class ValueSourceClass
683675 (b) => b
684676 ..message =
685677 'Make class have exactly one constructor: $expectedConstructor ;'
686- // TODO(davidmorgan): update when support for analyzer 8 is removed.
687- // ignore: deprecated_member_use
688- ..offset = classDeclaration.rightBracket.offset
678+ ..offset = classDeclaration.body.endToken.offset
689679 ..length = 0
690680 ..fix = ' $expectedConstructor ;\n ' ,
691681 ),
@@ -713,9 +703,7 @@ abstract class ValueSourceClass
713703 (b) => b
714704 ..message =
715705 'Make class have exactly one constructor: $expectedConstructor ;'
716- // TODO(davidmorgan): update when support for analyzer 8 is removed.
717- // ignore: deprecated_member_use
718- ..offset = classDeclaration.rightBracket.offset
706+ ..offset = classDeclaration.body.endToken.offset
719707 ..length = 0
720708 ..fix = ' $expectedConstructor ;\n ' ,
721709 ),
@@ -760,9 +748,7 @@ abstract class ValueSourceClass
760748 ..message =
761749 'Add a factory so your class can be instantiated. Example:\n\n '
762750 '$exampleFactory '
763- // TODO(davidmorgan): update when support for analyzer 8 is removed.
764- // ignore: deprecated_member_use
765- ..offset = classDeclaration.rightBracket.offset
751+ ..offset = classDeclaration.body.endToken.offset
766752 ..length = 0
767753 ..fix = ' $exampleFactory \n ' ,
768754 ),
0 commit comments