NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
pub.dev · #1 most downloaded on pub.dev
This package provides a library that performs static analysis of Dart code.
Last release today
06 Oct 2026
Ships fairly regularly
a new release about every 3 weeks
Nearly every release is documented
notes for 57 of the last 60 stable releases
3 versions withdrawn
withdrawn after publishing
13 years old
390 releases · first in 2013
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.One column per quarter.
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'.Deprecated LibraryElement.toLegacyTypeIfOptOut.
LibraryElement.toLegacyTypeIfOptOut.LibraryElement.toLegacyElementIfOptOut.LibraryElement.isNonNullableByDefault.InterfaceElement.lookUpGetter, InterfaceElement.lookUpMethod,
and InterfaceElement.lookUpSetter.GeneralizingAstVisitor.visitNamedType to invoke visitTypeAnnotation.PropertyInducingElement get variable in PropertyAccessorElement,
use PropertyInducingElement? get variable2 instead.
The reason for this is that when the property accessor is an augmentation
without the corresponding declaration, there is no corresponding variable.ExtensionDeclaration.onKeyword and extendedType.
Use ExtensionOnClause? get onClause instead.
Extension augmentations are not allowed to have onClause.OnClause, use MixinOnClause instead.@doNotSubmit.@mustBeConst.constructor, directive, enumValue, and
typeParameter.AstNode.getProperty and AstNode.setProperty. Clients who need
the ability to add arbitrary decorations to AST nodes can achieve the same
effect using Dart's built-in
Expando class.Patch for crash in ffi_verifier.
Your coding agent can read these notes before it upgrades. Set up the MCP server →