NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
pub.dev, #2 most downloaded on pub.dev
This package provides a library that performs static analysis of Dart code.
Latest stable
14.7.0
Last release 24 days ago
29 Oct 2026
Ships fairly regularly
a new release about every 2 weeks
Nearly every release is documented
notes for 58 of the last 60 stable releases
3 versions withdrawn
withdrawn after publishing
13 years old
392 releases · first in 2013
Drag across the ruler to compare, or tap a release to open it.
Publish analyzer version 14.7.0
Publish analyzer version 14.7.0
analyzer: enable-experiment: in analysis
options files, or from enabledExperiments of
AnalysisContextCollection. Files outside of any package also use
the language version of the host SDK, so they get the experiments.
Libraries in packages get them when their language version is the
language version of the host SDK.
Previously, experiments from analysis options files were enabled for
the analyzer's own latest language version, so when it differed from
the host SDK, they were silently ignored, for files outside of any
package (a regression in 14.2.0 through 14.6.0), and for libraries in
packages.
See https://github.com/dart-lang/sdk/issues/64693.// @dart = X.Y comment can
specify is the language version of the host SDK, as for the compiler
of this SDK. Previously, it was the analyzer's own latest language
version, so when the analyzer was newer than the SDK, overrides that
the compiler rejects were accepted, and when it was older, overrides
that the compiler accepts were reported as
invalid_language_version_override_greater.InstanceElement.children and TypeAliasElement.children include the
type parameters, as ExecutableElement.children already did. So element
visitors, such as GeneralizingElementVisitor2 and
RecursiveElementVisitor2, visit the type parameters of classes, enums,
extensions, extension types, mixins, and type aliases.Your coding agent can read these notes before it upgrades. Set up the MCP server →
Added the enabledExperiments parameter to AnalysisContextCollection to override experiments from analysis options files.
Added the enabledExperiments parameter to AnalysisContextCollection
to override experiments from analysis options files.
Fixed a regression in 14.2.0 through 14.5.0, where analyzer: exclude:
patterns from an included options file, such as
include: package:my_lints/options.yaml, were relative to the included
file, so they did not exclude any files of the including package. These
patterns are again relative to the folder of the analysis_options.yaml
file at the start of the include: chain.
See https://github.com/dart-lang/sdk/issues/64549.
Failed name and member lookups are reported by which lookup failed, and
whether a read or a write was required, instead of by the kind of
declaration guessed from the syntax, as proposed in
https://github.com/dart-lang/sdk/issues/64411. Each lookup has two new
diagnostics, one for reads, such as foo, foo(), and the read of
foo += 1, and one for writes, such as foo = v and the write of
foo += 1:
undefined_unqualified_name_read and undefined_unqualified_name_write,
for names without a qualifier, such as foo, foo<int>, @foo,
for (foo in xs), and (foo) = r.undefined_prefixed_name_read and undefined_prefixed_name_write, for
names imported with a prefix, such as p.foo.undefined_static_member_read and undefined_static_member_write, for
static members of a class, enum, mixin, extension type, or extension, such
as C.foo, and for dot shorthands, such as .foo and .foo().undefined_instance_member_read and undefined_instance_member_write,
for members of the static type of the receiver and its applicable
extensions, such as x.foo, and for the field foo of an object pattern
C(foo: _).undefined_extension_member_read and undefined_extension_member_write,
for extension overrides, such as E(x).foo.undefined_super_member_read and undefined_super_member_write, for
super.foo.undefined_super_operator, for super + v, -super, super[i], and
super[i] = v, which was a variant of undefined_super_member.A read fails when there is no method, getter, field, variable, function, or type with the name; a write fails when there is no setter or assignable variable. The message says what was found instead: only a setter, for a read; only a getter, a final or constant variable or field, a function, a method, or a type, for a write; or a private declaration of another library, for every lookup except unqualified names. Undefined names in annotations and constant expressions get corrections that suggest only what is valid there, and a dot shorthand names its context type.
These diagnostics replace undefined_identifier, undefined_function,
undefined_prefixed_name, undefined_getter, undefined_method,
undefined_setter, undefined_enum_constant,
dot_shorthand_undefined_member, undefined_extension_getter,
undefined_extension_method, undefined_extension_setter,
undefined_super_member, assignment_to_const, assignment_to_final,
assignment_to_final_no_setter, assignment_to_function,
assignment_to_method, assignment_to_type, and private_setter, which
are no longer reported. Replace them with the new names in // ignore:
comments and in analysis_options.yaml, where the old names are still
accepted, but have no effect.
Other behavior changes:
foo += 1, x.foo += 1,
super.foo ??= v, super.foo++, or super[i] += 1, reports only the
read when both the read and the write fail.super.foo() in
mixin M implements A now reports undefined_super_member_read instead
of abstract_super_member_reference, when only A has foo.E(x)._foo,
or as a static member, such as E._foo.undefined_static_member_read instead of dot_shorthand_missing_context,
which is now reported only when there is no context type.const_instance_field or
extension_declares_instance_field.A name in a constant expression whose read is already reported as invalid,
such as an undefined name in const x = foo;, const y = [C.foo];,
const z = 'abc'.lenght;, or @A(p.foo), no longer also reports that the
expression isn't constant, for example
const_initialized_with_non_constant_value, non_constant_list_element,
const_eval_property_access, or const_with_non_constant_argument. The
same applies to the initializers of a constant constructor, such as
const A() : f = foo;, which no longer also reports invalid_constant
there, or invalid_constant at each invocation such as const A().
ElementAnnotation.constantEvaluationErrors still includes these errors.
Deprecated CommentReference.newKeyword. It now always returns null.
languageVersionOverride parameter to AnalysisContextCollection
to override the default language version for non-SDK files.new keyword in comment references. Text such as [new C] in a documentation comment is no
longer a comment reference, so it isn't resolved, indexed, or renamed. Use [C.new] instead.CommentReference.newKeyword. It now always returns null.deprecated_new_in_comment_reference diagnostic, along with its quick fix.dead_code for a loop
over an expression of type Never starts at the loop body instead of the
loop variable.@C(args), is the
constructor invocation const C(args). Annotations report the same
diagnostics as the equivalent constant expressions, usually at the name or
the argument instead of the whole annotation:
undefined_identifier or undefined_prefixed_name for undefined names.creation_with_non_type for @f(), where f isn't a class.const_with_undefined_constructor for undefined constructors.const_with_non_const for constructors that aren't const.const_deferred_class for constructors of classes from a deferred library.
invalid_annotation_from_deferred_library is still reported for
annotations without arguments.wrong_number_of_type_arguments for the type as written, such as a type
alias, instead of the class that it denotes.const_constructor_param_type_mismatch in addition to
argument_type_not_assignable, as for const C(...).invalid_reference_to_generative_enum_constructor for @E(), where E is
an enum, and instantiate_abstract_class for @C(), where C is
abstract. These weren't reported before.undefined_annotation diagnostic. It was reported only when the
first name of an annotation was undefined, while an undefined name after a
class, as in @Foo.bar, was reported as invalid_annotation. Annotations
that aren't identifiers, such as @1 or @'string', report only the syntax
error.non_constant_annotation_constructor diagnostic. @C(), where
the constructor isn't const, reports const_with_non_const. @C and
@C.named report no_annotation_constructor_arguments whether or not the
constructor is const.invalid_annotation is reported only for an annotation without arguments
that references neither a constant variable nor a constructor, such as a
getter or a function. It's no longer reported for undefined names, undefined
constructors, invocations of things that aren't classes, or in addition to
ambiguous_import or annotation_with_type_arguments_uninstantiated.missing_required_argument for an annotation highlights the constructor
reference, such as A.named or p.A, and
inference_failure_on_instance_creation highlights the class name, instead
of the whole annotation.const_with_non_constant_argument is no longer reported in addition to
const_with_non_const for an invocation of a constructor that isn't const in
the arguments of an annotation.const_with_non_constant_argument, like a positional argument, instead of
invalid_constant.ElementAnnotation.constantEvaluationErrors reports the same error as the
diagnostic for the annotation. For example, for @A(x), where x isn't a
constant, it is now const_with_non_constant_argument instead of
invalid_constant./// @docImport 'dart:io' as io;.
Documentation comments can reference [io.File], and the prefix itself as [io].
The prefix is a PrefixElement whose imports are the doc imports with this prefix;
it isn't included into LibraryFragment.prefixes.
Removed the doc_import_cannot_have_prefix diagnostic.show / hide combinators are applied.
Removed the doc_import_cannot_have_combinators diagnostic.PrefixElement.scopeLibraries, the libraries that provide the names
in PrefixElement.scope. Unlike imports, it includes the libraries
imported with the same prefix in the enclosing files. When a prefix is used
alone, such as [math] in a documentation comment, it references the
library, if there is exactly one.ambiguous_comment_reference warning. It is reported for a name in
a comment reference that is imported, or doc-imported, from more than one
library, and for a prefix used alone, such as [p], when more than one
library is imported with this prefix.Added experimental CompilationUnit.lookupThisType, which queries the type of this at an arbitrary offset within the compilation unit.
CompilationUnit.lookupThisType, which queries the type of
this at an arbitrary offset within the compilation unit.FunctionBody.lookupThisType. Use
CompilationUnit.lookupThisType instead; unlike the removed method, it also
works at offsets that aren't inside a function body (for example inside the
initializer of a late instance field).The version 14.2.0 was retracted because of adding acccidental files.
14.2.0 was retracted because of adding acccidental files.Added experimental structural formal parameter list APIs: FormalParameterList.requiredPositionalFormalParameters, FormalParameterList.delimitedFormalP
FormalParameterList.requiredPositionalFormalParameters, FormalParameterList.delimitedFormalParameters, and the DelimitedFormalParameters node.* Internal changes only
Breaking Change: Removed FormalParameterElement.isInitializingFormal. Use type checks (element is FieldFormalParameterElement) instead.
FormalParameterElement.isInitializingFormal. Use type checks (element is FieldFormalParameterElement) instead.FormalParameterElement.isSuperFormal. Use type checks (element is SuperFormalParameterElement) instead.PackageConfigFileBuilder from package:analyzer/utilities/package_config_file_builder.dart. Use package:analyzer_testing/package_config_file_builder.dart instead.FormalParameterElement.formalParameters. Use FormalParameterElement.type instead.FormalParameterElement.typeParameters. Use FormalParameterElement.type instead.Add Folder.getFile, deprecate Folder.getChildAssumingFile.
Folder.getFile, deprecate Folder.getChildAssumingFile.Folder.getFolder, deprecate Folder.getChildAssumingFolder.Deprecate FormalParameterElement.formalParameters and typeParameters. Use FormalParameterElement.type instead.
3.x.x.FormalParameterElement.formalParameters and typeParameters. Use FormalParameterElement.type instead.isComplete to ConstructorDeclaration, FunctionDeclaration, and MethodDeclaration.MethodDeclaration.isAbstract. Use !isComplete instead.excludedPaths parameter in AnalysisContextCollection. Use analysis_options.yaml to configure excluded paths instead.Deprecate PackageConfigFileBuilder in package:analyzer/utilities/package_config_file_builder.dart. Use package:analyzer_testing/package_config_file_bu…
PackageConfigFileBuilder in package:analyzer/utilities/package_config_file_builder.dart. Use package:analyzer_testing/package_config_file_builder.dart instead.isInitializingFormal in FormalParameterElement. Use type checks (element is FieldFormalParameterElement) instead.isSuperFormal in FormalParameterElement. Use type checks (element is SuperFormalParameterElement) instead.ExtensionTypeDeclaration.primaryConstructor. Use ExtensionTypeDeclaration.namePart instead.Breaking Change: MixinFragment.superclassConstraints has been removed. Use fragment.element.superclassConstraints instead.
MixinFragment.superclassConstraints has been removed. Use fragment.element.superclassConstraints instead.DefaultFormalParameter has been removed. Default values for parameters are now represented compositionally via a defaultClause property on all FormalParameter nodes.SimpleFormalParameter and FunctionTypedFormalParameter have been removed and replaced by RegularFormalParameter.functionTypedSuffix property on FormalParameter.NormalFormalParameter has been removed from the AST hierarchy.AstVisitor methods visitDefaultFormalParameter, visitSimpleFormalParameter, and visitFunctionTypedFormalParameter have been removed. Use visitRegularFormalParameter instead for standard parameters.FormalParameterDefaultClause and FunctionTypedFormalParameterSuffix AST nodes to represent parameter defaults and function-typed parameter structures.NamedExpression has been removed and replaced with NamedArgument in ArgumentList and RecordLiteralNamedField in RecordLiteral.Argument and RecordLiteralField AST node interfaces, which Expression now implements.ArgumentList.arguments now returns NodeList<Argument> instead of NodeList<Expression>.RecordLiteral.fields now returns NodeList<RecordLiteralField> instead of NodeList<Expression>.AstVisitor.visitNamedExpression has been removed. Use visitNamedArgument and visitRecordLiteralNamedField instead.FormalParameterElement.firstFragment and .fragments now return FormalParameterFragment (instead of specific parameter fragment subtypes like FieldFormalParameterFragment), making formal parameter fragments heterogeneous to support augmentations.LabelReference AST node to represent references to labels without them being in the expression hierarchy.Label now uses a Token name instead of SimpleIdentifier label.BreakStatement.label and ContinueStatement.label now return LabelReference? instead of SimpleIdentifier?.Support type aliases for dynamic, Never, and void. As a result, it is no longer safe to assume that there is a single instance of DynamicType, NeverTy
dynamic, Never, and void. As a result, it is no longer safe to assume that
there is a single instance of DynamicType, NeverType, or VoidType. Use type checks (is DynamicType)
instead of identical().Breaking Change: ClassBody is now a sealed class with subclasses BlockClassBody and EmptyClassBody. Getters like .members, .leftBracket, and .rightBra…
InstantiatedTypeAliasElement.nullabilitySuffix.;) in enums, extensions, and mixins, representing
them in the AST with EmptyEnumBody and EmptyClassBody.ClassBody is now a sealed class with subclasses
BlockClassBody and EmptyClassBody. Getters like .members, .leftBracket,
and .rightBracket are available on BlockClassBody. This affects
ClassDeclaration, ExtensionDeclaration, and MixinDeclaration bodies.EnumBody is now a sealed class with subclasses
BlockEnumBody and EmptyEnumBody. Getters like .members, .leftBracket,
and .rightBracket are available on BlockEnumBody.LibraryIdentifier. LibraryDirective.name and
PartOfDirective.libraryName now return DottedName?.DottedName.components (NodeList<SimpleIdentifier>) is
replaced with DottedName.tokens (List<Token>).Remove deprecated ClassDeclaration.leftBracket.
ClassDeclaration.leftBracket.ClassDeclaration.members.ClassDeclaration.name.ClassDeclaration.rightBracket.ClassDeclaration.typeParameters.EnumDeclaration.constants.EnumDeclaration.leftBracket.EnumDeclaration.members.EnumDeclaration.name.EnumDeclaration.rightBracket.EnumDeclaration.semicolon.EnumDeclaration.typeParameters.ExtensionDeclaration.leftBracket.ExtensionDeclaration.members.ExtensionDeclaration.rightBracket.ExtensionTypeDeclaration.constKeyword.ExtensionTypeDeclaration.leftBracket.ExtensionTypeDeclaration.members.ExtensionTypeDeclaration.name.ExtensionTypeDeclaration.representation.ExtensionTypeDeclaration.rightBracket.ExtensionTypeDeclaration.typeParameters.ConstructorDeclaration.returnType.MixinDeclaration.leftBracket.MixinDeclaration.members.MixinDeclaration.rightBracket.NamedCompilationUnitMember.RepresentationConstructorName.RepresentationDeclaration.ConstructorElement.isSynthetic.ConstructorFragment.isSynthetic.Element.isSynthetic.ExecutableFragment.isSynthetic.PropertyAccessorElement.isSynthetic.PropertyInducingElement.isSynthetic.PropertyInducingFragment.isSynthetic.visitNamedCompilationUnitMember.visitRepresentationConstructorName.visitRepresentationDeclaration.RuleVisitorRegistry.addRepresentationConstructorName.RuleVisitorRegistry.addRepresentationDeclaration.ClassDeclaration, EnumDeclaration, FunctionDeclaration,
MixinDeclaration, and TypeAlias now implement CompilationUnitMember
directly (instead of NamedCompilationUnitMember).Deprecate RuleVisitorRegistry.addRepresentationConstructorName.
RuleVisitorRegistry.addRepresentationConstructorName.RuleVisitorRegistry.addRepresentationDeclaration.Breaking Change: Identifiers and prefixed identifiers that resolve to a type (such as a class, type alias, dynamic, or Never) in a value expression sl…
TypeSystem.futureValueType.ConstructorElement.isDeclaring.ConstructorElement.isPrimary.FieldElement.declaringFormalParameter.FieldFormalParameterElement.isDeclaring and privateName.FieldFormalParameterFragment.privateName.LibraryFragment.isSynthetic, use isOriginNotExistingFile instead.dynamic, or Never) in a value expression slot are now represented as TypeLiteral nodes instead of
SimpleIdentifier or PrefixedIdentifier nodes (Issues 62763, 63113).* Internal changes only
Require version ^1.18.0 of the meta package.
Breaking Change: While the deprecated members mentioned above still exist in the AST, their parent nodes have changed. This means that code relying on…
ClassDeclaration:
leftBracket, members, rightBracket are deprecated; use
body instead.name, typeParameters are deprecated; use namePart instead.EnumDeclaration:
leftBracket, constants, members, rightBracket are
deprecated; use body instead.name, typeParameters are deprecated; use namePart instead.ExtensionDeclaration:
leftBracket, members, rightBracket are deprecated; use
body instead.ExtensionTypeDeclaration:
leftBracket, constants, members, rightBracket are
deprecated; use body instead.constKeyword, name, representation, typeParameters are
deprecated; use primaryConstructor instead.DiagnosticOrErrorListener and the
DiagnosticOrErrorListenerExtension extension.RecordingDiagnosticListener.onError
and BooleanDiagnosticListener.onError methods.LintCode.new's hasPublishedDocs parameter.RemovedAnalysisRule as the preferred way to represent removed lint
rules. Deprecated RuleState.removed (which was the previous way to do so).ConstructorElement.isSynthetic.
Use isOriginDeclaration, isOriginImplicitDefault,
isOriginMixinApplication instead.TopLevelVariableElement.isSynthetic.
Use isOriginDeclaration, isOriginGetterSetter.FieldElement.isSynthetic.
Use isOriginDeclaration, isOriginGetterSetter,
isOriginDeclaringFormalParameter, isOriginEnumValues instead.PropertyAccessorElement.isSynthetic.
Use isOriginDeclaration, isOriginInterface, isOriginVariable instead.Element.isSynthetic; use isOriginXyz properties instead.LibraryElement.isSynthetic; use isOriginNotExistingFile instead.SyntacticEntity is not intended to be subclassed by
clients.DiagnosticCode.name and DiagnosticCode.uniqueName. Use
DiagnosticCode.lowerCaseName and DiagnosticCode.lowerCaseUniqueName
instead.GitPluginSource, PathPluginSource,
PluginConfiguration, PluginSource, VersionedPluginSource from the
public API.AnalysisOptions.pluginConfigurations.Remove deprecated field Diagnostic.data.
Diagnostic.data.DiagnosticReporter.atOffset and the constructors
Diagnostic.tmp and Diagnostic.forValues, remove the deprecated named
parameter errorCode, and make the named parameter diagnosticCode
non-nullable and required.DiagnosticReporter.atOffset named parameter, errorCode.BooleanErrorListener.RecordingErrorListener.AnalysisErrorListener.NULL_LISTENER.AstNodeExtension.NullShortableExpression.PartDirective.configurations.TypeDefiningElement.TypeAliasElement.aliasedElement.resolveFile2.ErrorCode.ErrorSeverity.ErrorType.AnalysisErrorListener.RecordingDiagnosticListener.errors.RecordingDiagnosticListener.getErrorForSource.BooleanDiagnosticListener.onError in favor of .onDiagnostic.RecordingDiagnosticListener.onError in favor of .onDiagnostic.DiagnosticOrErrorListener in favor of DiagnosticListener.Nothing published for this version
Deprecate TypeAliasElement.aliasedElement, use aliasedType instead.
experimental_member_use warning, which warns about any reference to
a declaration annotated with @experimental.TypeAliasElement.aliasedElement, use aliasedType instead.Deprecate TypeDefiningElement, check for specific elements.
TypeDefiningElement, check for specific elements.TypeDefiningFragment, check for specific fragments.PartDirective.configurations, removed from the specification.Deprecate Diagnostic.data. Instead, please use an expando to attach data to the Diagnostic object.
^3.9.0.Diagnostic.data. Instead, please use an expando to attach data to
the Diagnostic object.CatchClauseParameter.declaredElement and CatchClauseParameter.declaredElement2.
Use CatchClauseParameter.declaredFragment instead.DeclaredIdentifier.declaredElement and DeclaredIdentifier.declaredElement2.
Use DeclaredIdentifier.declaredFragment instead.DeclaredVariablePattern.declaredElement and DeclaredVariablePattern.declaredElement2.
Use DeclaredVariablePattern.declaredFragment instead.VariableDeclaration.declaredElement and VariableDeclaration.declaredElement2.
Use VariableDeclaration.declaredFragment instead.InterfaceFragment.interfaces, use InterfaceElement.interfaces instead.InterfaceFragment.mixins, use InterfaceElement.mixins instead.InterfaceFragment.supertype, use InterfaceElement.supertype instead.ExtensionTypeFragment.primaryConstructor, use ExtensionTypeElement.primaryConstructor.ExtensionTypeFragment.representation, use ExtensionTypeElement.representation.NullShortableExpression. This interface should not be needed by
analyzer clients, and is no longer supported.Fix for EnumSet usage when compiled to JavaScript.
EnumSet usage when compiled to JavaScript.Deprecate LibraryElementResult.element2, use element instead.
DartObject.constructorInvocation with the constructor and arguments.PropertyAccessorElement.variable non-nullable.documentationComment to Element and Fragment.metadata to Element and Fragment.metadata to ElementDirective.partKeywordOffset to PartInclude.package:build.LibraryElementResult.element2, use element instead.ResolvedLibraryResult.element2, use element instead.ResolvedUnitResult.libraryElement2, use libraryElement instead.AnalysisSession.getParsedLibraryByElement2, use getParsedLibraryByElement instead.AnalysisSession.getResolvedLibraryByElement2, use getResolvedLibraryByElement instead.resolveFile2, use resolveFile instead.DartObject.variable2, use variable instead.DartObject.toFunctionValue2, use toFunctionValue instead.Annotatable, use documentationComment and metadata of Element or Fragment directly.ClassElement.isExtendableIn; use isExtendableOutside instead.ClassElement.isImplementableIn; use isImplementableOutside instead.ClassElement.isMixableIn; use isMixableOutside instead.MixinElement.isImplementableIn; use isImplementableOutside instead.Remove deprecated element model V1.
DartType.isStructurallyEqualTo.RecordType.positionalTypes.RecordType.sortedNamedTypes.ElementLocation class; its values are not returned anymore.AnalysisContext.analysisOptions.PromotableElement and PromotableFragment.LocalVariableElement.hasInitializer.LocalVariableFragment.hasInitializer.LocalVariableFragment.nameOffset.JoinPatternVariableFragment.isConsistent.JoinPatternVariableFragment.variables2.VariableElement.constantInitializer2.VariableFragment.initializer.ConstantInitializer.HasSinceSdkVersion.LibraryFragment is not Annotatable anymore.ConstantEvaluationTarget by ElementAnnotation.
This is an internal interface that should not have been exposed.element2.dart library; import element.dart.XyzElement2 classes; use XyzElement instead.AnalysisError.correction field; use
AnalysisError.correctionMessage instead.AnalysisError; use Diagnostic instead.ErrorCode; use DiagnosticCode instead.ErrorReporter.atOffset's errorCode parameter; use
diagnosticCode instead.ErrorSeverity; use DiagnosticSeverity instead.DiagnosticCode.errorSeverity; use
DiagnosticCode.diagnosticSeverity instead.AnalysisErrorListener, BooleanErrorListener, and
RecordingErrorListener; use DiagnosticListener,
BooleanDiagnosticListener, and RecordingDiagnosticListener respectively,
instead. Instead of calling or overriding AnalysisErrorListener.onError,
call or override DiagnosticListener.onDiagnostic. Instead of using
AnalysisErrorListener.NULL_LISTENER, use DiagnosticListener.nullListener.RecordingErrorListener.errors; use
RecordingDiagnosticListener.diagnostics instead.RecordingErrorListener.getErrorsForSource; no longer supported.AnalysisResultWithErrors; use AnalysisResultWithDiagnostics
instead.AnalysisResultWithErrors.errors; use
AnalysisResultWithErrors.diagnostics instead.ErrorType; use DiagnosticType instead.ElementDirective from sealed to abstract.
This allows the analyzer to have an internal implementation
class corresponding to ElementDirective.NamedType.name2, use name instead.ClassElement.isXyzIn2, use isXyzIn instead.Element.enclosingElement2, use enclosingElement instead.InstanceElement.fields2, use fields instead.InstanceElement.getters2, use getters instead.InstanceElement.setters2, use setters instead.InstanceElement.methods2, use methods instead.InstanceElement.getField2, use getField instead.InstanceElement.getGetter2, use getGetter instead.InstanceElement.getSetter2, use getSetter instead.InstanceElement.getMethod2, use getMethod instead.InstanceFragment.fields2, use fields instead.InstanceFragment.methods2, use methods instead.InterfaceElement.constructors2, use constructors instead.InterfaceFragment.constructors2, use constructors instead.JoinPatternVariableElement.variables2, use variables instead.Annotatable.metadata2, use metadata instead.Element.nonSynthetic2, use nonSynthetic instead.Element.library2, use library instead.ExtensionTypeElement.primaryConstructor2, use primaryConstructor instead.ExtensionTypeElement.representation2, use representation instead.ExtensionTypeFragment.primaryConstructor2, use primaryConstructor instead.ExtensionTypeFragment.representation2, use representation instead.InterfaceType.getGetter2, use getGetter instead.InterfaceType.getMethod2, use getMethod instead.InterfaceType.getSetter2, use getSetter instead.InterfaceType.lookUpConstructor2, use lookUpConstructor instead.InterfaceType.lookUpGetter3, use lookUpGetter instead.InterfaceType.lookUpMethod3, use lookUpMethod instead.InterfaceType.lookUpSetter3, use lookUpSetter instead.PropertyAccessorFragmentImplImplicitGetter, PropertyAccessorFragmentImplImplicitSetter,
and FormalParameterFragmentImplOfImplicitSetter, replace with GetterFragmentImpl, and SetterFragmentImpl.ExtensionTypeFragment.representation2, use representation instead.DartType.element3, use element instead.LibraryElement.loadLibraryFunction2, use loadLibraryFunction instead.InterfaceType.constructors2, use constructors instead.Element.accept2, use accept instead.InstantiatedTypeAliasElement.element2, use element instead.TypeProvider.boolElement2, use boolElement instead.TypeProvider.doubleElement2, use doubleElement instead.TypeProvider.enumElement2, use enumElement instead.TypeProvider.futureElement2, use futureElement instead.TypeProvider.futureOrElement2, use futureOrElement instead.TypeProvider.intElement2, use intElement instead.TypeProvider.iterableElement2, use iterableElement instead.TypeProvider.listElement2, use listElement instead.TypeProvider.mapElement2, use mapElement instead.TypeProvider.nullElement2, use nullElement instead.TypeProvider.numElement2, use numElement instead.TypeProvider.objectElement2, use objectElement instead.TypeProvider.recordElement2, use recordElement instead.TypeProvider.setElement2, use setElement instead.TypeProvider.streamElement2, use streamElement instead.TypeProvider.stringElement2, use stringElement instead.TypeProvider.symbolElement2, use symbolElement instead.Annotation.element2, use element instead.LibraryDirective.name2, use name instead.CatchClauseParameter.declaredElement2, use declaredElement instead.CompoundAssignmentExpression.readElement2, use readElement instead.CompoundAssignmentExpression.writeElement2, use writeElement instead.DeclaredIdentifier.declaredElement2, use declaredElement instead.DeclaredVariablePattern.declaredElement2, use declaredElement instead.EnumConstantDeclaration.constructorElement2, use constructorElement instead.ExtensionOverride.element2, use element instead.FunctionBody.isPotentiallyMutatedInScope2, use isPotentiallyMutatedInScope instead.ImportPrefixReference.element2, use element instead.LibraryDirective.element2, use element instead.LibraryDirective.name2, use name instead.NamedExpression.element2, use element instead.NamedType.element2, use element instead.PatternField.element2, use element instead.RelationalPattern.element2, use element instead.VariableDeclaration.declaredElement2, use declaredElement instead.InterfaceType.methods2, use methods instead.Fragment.name2, use name instead.Element.name3, use name instead.ConstructorElement.redirectedConstructor2, use redirectedConstructor instead.ConstructorElement.superConstructor2, use superConstructor˙ instead.Element.children2, use children instead.Element.displayString2, use displayString instead.Element.getExtendedDisplayName2, use getExtendedDisplayName instead.Element.isAccessibleIn2, use isAccessibleIn instead.Element.thisOrAncestorMatching2, use thisOrAncestorMatching instead.Element.thisOrAncestorOfType2, use thisOrAncestorOfType instead.EnumElement.constants2, use constants instead.FieldFormalParameterElement.field2, use field instead.FormalParameterElement.typeParameters2, use typeParameters instead.Fragment.children3, use children instead.DartType.asInstanceOf2, use asInstanceOf instead.TypeSystem.instantiateInterfaceToBounds2, use instantiateInterfaceToBounds instead.TypeSystem.instantiateTypeAliasToBounds2, use instantiateTypeAliasToBounds instead.FormalParameterElement.appendToWithoutDelimiters, use appendToWithoutDelimiters instead.GetterElement.correspondingSetter2, use correspondingSetter instead.InterfaceElement.unnamedConstructor2, use unnamedConstructor instead.InterfaceElement.getNamedConstructor2, use getNamedConstructor instead.TypeParameterizedElement.typeParameters2, use typeParameters instead.FormalParameterElement.appendToWithoutDelimiters2, use appendToWithoutDelimiters instead.GetterElement.correspondingSetter2, use correspondingSetter instead.InterfaceElement.unnamedConstructor2, use unnamedConstructor instead.InterfaceElement.getNamedConstructor2, use getNamedConstructor instead.LibraryElement.entryPoint2, use entryPoint instead.LibraryElement.exportedLibraries2, use exportedLibraries instead.LibraryElement.getClass2, use getClass instead.LibraryElement.getEnum2, use getEnum instead.LibraryElement.getMixin2, use getMixin instead.LibraryExport.exportedLibrary2, use exportedLibrary instead.LibraryFragment.accessibleExtensions2, use accessibleExtensions instead.LibraryFragment.importedLibraries2, use importedLibraries instead.LibraryImport.importedLibrary2, use importedLibrary instead.MixinElement.isImplementableIn2, use isImplementableIn instead.PatternVariableElement.join2, use join instead.PropertyAccessorElement.variable3, use variable instead.PropertyInducingElement.getter2, use getter instead.PropertyInducingElement.setter2, use setter instead.SetterElement.correspondingGetter2, use correspondingGetter instead.SuperFormalParameterElement.superConstructorParameter2, use superConstructorParameter instead.TypeAliasElement.aliasedElement2, use aliasedElement instead.TypeParameterizedElement.typeParameters2, use typeParameters instead.VariableElement.constantInitializer2, use constantInitializer instead.TypeProvider.isNonSubtypableClass2, use isNonSubtypableClass instead.EnumFragment.constants2, use constants instead.InterfaceElement.lookUpInheritedMethod2, use lookUpInheritedMethod instead.LibraryFragment.classes2, use classes instead.LibraryFragment.enums2, use enums instead.LibraryFragment.extensionTypes2, use extensionTypes instead.LibraryFragment.extensions2, use extensions instead.LibraryFragment.functions2, use functions instead.LibraryFragment.libraryExports2, use libraryExports instead.LibraryFragment.libraryImports2, use libraryImports instead.LibraryFragment.mixins2, use mixins instead.LibraryFragment.topLevelVariables2, use topLevelVariables instead.LibraryFragment.typeAliases2, use typeAliases instead.PatternVariableFragment.join2, use join instead.LibraryFragment.isNonSubtypableClass2, use isNonSubtypableClass instead.TypeParameterizedFragment.typeParameters2, use typeParameters instead.Fragment.nameOffset2, use nameOffset instead.DirectiveUriWithLibrary.library2, use library instead.ElementAnnotation.element2, use element instead.LibraryImport.prefix2, use prefix instead.MultiplyDefinedElement.conflictingElements2, use conflictingElements instead.ScopeLookupResult.getter2, use getter instead.ScopeLookupResult.setter2, use setter instead.Nothing published for this version
Deprecated HasSinceSdkVersion, use Element2.sinceSdkVersion.
HasSinceSdkVersion, use Element2.sinceSdkVersion.Deprecated VariableElement.constantInitializer2, use constantInitializer instead.
VariableElement.constantInitializer2, use constantInitializer instead.VariableFragment.initializer, use VariableElement.constantInitializer instead.ConstantInitializer.Deprecated JoinPatternVariableFragment.isConsistent and variables2. Use corresponding properties of JoinPatternVariableElement2 instead.
JoinPatternVariableFragment.isConsistent and variables2.
Use corresponding properties of JoinPatternVariableElement2 instead.Add a special case for bool.fromEnvironment('dart.library.js_interop') Cherry-pick https://dart-review.googlesource.com/c/sdk/+/439820
Deprecate LocalVariableFragment.nameOffset, use nameOffset2 instead.
LocalVariableFragment.nameOffset, use nameOffset2 instead.Deprecate EnumFragment.constants2, use EnumElement2.constants2 instead.
EnumFragment.constants2, use EnumElement2.constants2 instead.Deprecate LocalVariableElement.hasInitializer and LocalVariableFragment.hasInitializer. This property is not useful and was not de-facto used.
LocalVariableElement.hasInitializer and LocalVariableFragment.hasInitializer.
This property is not useful and was not de-facto used.Deprecate PromotableFragment and PromotableElement. These interfaces are implementation details.
PromotableFragment and PromotableElement.
These interfaces are implementation details.Deprecate AugmentedExpression and AugmentedInvocation. This feature was removed from the specification.
AugmentedExpression and AugmentedInvocation.
This feature was removed from the specification.Deprecate LibraryElement.identifier, use uri instead.
LibraryElement.identifier, use uri instead.LibraryElement2.identifier, use uri instead.Deprecate ConstantEvaluationTarget itself, and its methods.
ConstantEvaluationTarget itself, and its methods.AnalysisTarget.api.txt manifest.Deprecate methods inherited by ElementAnnotation from ConstantEvaluationTarget.
ElementAnnotation from ConstantEvaluationTarget.ElementAnnotation will stop implementing ConstantEvaluationTarget.ElementAnnotation.libraryFragment, as the replacement for the
deprecations above. It provides enough information about the location.Deprecate PropertyAccessorFragment.variable3. Use PropertyAccessorElement2.variable3 instead.
PropertyAccessorFragment.variable3.
Use PropertyAccessorElement2.variable3 instead.PropertyInducingFragment.getter2.
Use PropertyInducingElement2.getter2 instead.PropertyInducingFragment.setter2.
Use PropertyInducingElement2.setter2 instead.Fix for https://github.com/dart-lang/sdk/issues/60683
Fix for https://github.com/dart-lang/sdk/issues/60553, LabelElement2.
LabelElement2.Fix for https://github.com/dart-lang/sdk/issues/60591
Fix for https://github.com/dart-lang/sdk/issues/60553, PrefixElement2.
PrefixElement2.Restore InstanceElement.augmented getter. This API was removed in 7.4.0 under the assumption that its removal would not be a breaking change, because…
InstanceElement.augmented getter.
This API was removed in 7.4.0 under the assumption that its removal would
not be a breaking change, because it was marked as @experimental.
But it turns out that some clients had been published to pub that relied
on it. So, these APIs were restored, and implemented on top of Element2.Deprecated element model V1. See migration guide.
^3.5.0.Add flags optional named parameter to FeatureSet.latestLanguageVersion().
flags optional named parameter to FeatureSet.latestLanguageVersion().Add ElementDirective as superinterface for LibraryExport, LibraryImport, and PartInclude. It implements Annotatable.
ElementDirective as superinterface for LibraryExport, LibraryImport,
and PartInclude. It implements Annotatable.New APIs for element model with fragments.
Remove deprecated DartType.element2.
DartType.element2.DartType.isDynamic.DartType.isVoid.DartType.resolveToBound.IfElement.condition.IfStatement.condition.AstNode.getProperty and AstNode.setProperty.File.createSource(), it violates levels of abstraction.
You can get Source instances from AnalysisResults.LibraryElement.toLegacyTypeIfOptOut.LibraryElement.toLegacyElementIfOptOut.LibraryElement.isNonNullableByDefault.File.changes and Folder.changes.Resource.parent2.OnClause.ContextBuilder, use AnalysisContextCollection.ContextLocator, use AnalysisContextCollection.ClassOrAugmentationDeclaration..MixinOrAugmentationDeclaration..AnalysisError.TypeSystem.instantiateToBounds2.buildSdkSummary2().FileSource.fileReadMode.ErrorReporter.Comment.isBlock, isDocumentation, isEndOfLine.Element.enclosingElement.PropertyAccessor.variable.LibraryOrAugmentationElement.LibraryElement properties.enabledPluginNames and hint from AnalysisOptions.source_io.dart.lint/Spelunker.source_resource.dart.MultiplyInheritedExecutableElement.AnalyzeFunctionBodiesPredicate.normalParameterNames and optionalParameterNames from FunctionType.Un-deprecated LibraryElement.exportedLibraries.
LibraryElement.exportedLibraries.LibraryElement.importedLibraries.Deprecated LibraryElement.accessibleExtensions, use CompilationUnitElement.accessibleExtensions instead.
LibraryElement.accessibleExtensions, use
CompilationUnitElement.accessibleExtensions instead.LibraryElement.exportedLibraries.LibraryElement.importedLibraries.LibraryElement.isBrowserApplication.LibraryElement.libraryExports,
use CompilationUnitElement.libraryExports instead.LibraryElement.libraryImports,
use CompilationUnitElement.libraryImports instead.LibraryElement.prefixes,
use CompilationUnitElement.libraryImportPrefixes instead.LibraryElement.parts,
use CompilationUnitElement.parts instead.LibraryElement.scope,
use CompilationUnitElement.scope instead.Deprecated Element.enclosingElement, use enclosingElement3.
NormalFormalParameter now implements AnnotatedNode.Element.enclosingElement, use enclosingElement3.Deprecated ContextLocator and ContextBuilder. Use AnalysisContextCollection instead.
AnalysisContextCollection.dispose(). It must be invoked at the end.ContextLocator and ContextBuilder.
Use AnalysisContextCollection instead.Deprecated File.createSource(), it violates levels of abstraction. You can get Source instances from AnalysisResults.
File.createSource(), it violates levels of abstraction.
You can get Source instances from AnalysisResults.AnalysisError.Deprecated package:analyzer/src/source/source_resource.dart, import package:analyzer/source/file_source.dart instead.
src/file_system/file_system.dart
from file_system/file_system.dart.package:analyzer/src/source/source_resource.dart,
import package:analyzer/source/file_source.dart instead.package:analyzer/src/source/source.dart,
import package:analyzer/source/source.dart instead.Updated constraints macros: '>=0.1.2-0 <0.1.3'.
macros: '>=0.1.2-0 <0.1.3'.Updated constraints macros: '>=0.1.1-0 <0.1.2'.
macros: '>=0.1.1-0 <0.1.2'.One column per quarter.