TargetKind enum Null safety

An enumeration of the kinds of targets to which an annotation can be applied.

Constants

classType → const TargetKind

Indicates that an annotation is valid on any class declaration.

const TargetKind(0)
enumType → const TargetKind

Indicates that an annotation is valid on any enum declaration.

const TargetKind(1)
extension → const TargetKind

Indicates that an annotation is valid on any extension declaration.

const TargetKind(2)
field → const TargetKind

Indicates that an annotation is valid on any field declaration, both instance and static fields, whether it's in a class, mixin or extension.

const TargetKind(3)
function → const TargetKind

Indicates that an annotation is valid on any top-level function declaration.

const TargetKind(4)
getter → const TargetKind

Indicates that an annotation is valid on any getter declaration, both instance or static getters, whether it's in a class, mixin, extension, or at the top-level of a library.

const TargetKind(6)
library → const TargetKind

Indicates that an annotation is valid on the first directive in a library, whether that's a library, import, export or part directive. This doesn't include the part of directive in a part file.

const TargetKind(5)
method → const TargetKind

Indicates that an annotation is valid on any method declaration, both instance and static methods, whether it's in a class, mixin or extension.

const TargetKind(7)
mixinType → const TargetKind

Indicates that an annotation is valid on any mixin declaration.

const TargetKind(8)
parameter → const TargetKind

Indicates that an annotation is valid on any formal parameter declaration, whether it's in a function, method, constructor, or closure.

const TargetKind(9)
setter → const TargetKind

Indicates that an annotation is valid on any setter declaration, both instance or static setters, whether it's in a class, mixin, extension, or at the top-level of a library.

const TargetKind(10)
type → const TargetKind

Indicates that an annotation is valid on any declaration that introduces a type. This includes classes, enums, mixins and typedefs, but does not include extensions because extensions don't introduce a type.

const TargetKind(11)
typedefType → const TargetKind

Indicates that an annotation is valid on any typedef declaration.

const TargetKind(12)
values → const List<TargetKind>

A constant List of the values in this enum, in order of their declaration.

const List<TargetKind>

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
index int

The integer index of this enum.

final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
Returns a string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited