RecordUse class
Annotation on a statically resolved member or class whose usages will be recorded.
During compilation, usages of annotated declarations in reachable code are recorded, and information about these usages is made available to post-compile steps (such as link hooks). Usages in unreachable code are not recorded.
- If placed on a statically resolved function or member (such as a top-level function, static method, non-redirecting factory constructor, getter, setter, operator, extension method, or extension type method), all calls to or tear-offs of that member in reachable code will be recorded, along with arguments passed to the call as far as they can be evaluated as constant expressions at compile time. Generative constructors and redirecting factory constructors cannot be annotated directly.
- If placed on a class, any constant instance of the class (including
instances created via
constredirecting factory constructors), any non-const generative constructor invocation, and any generative constructor tear-off in reachable code will be recorded. Calls to non-const factory constructors are not recorded directly by annotating the class; rather, any generative constructor invocation within the factory body will be recorded.
Only usages in executable code are recorded. Usages appearing within metadata (annotations) are ignored.
The RecordUse annotation is only allowed on declarations within a
package's lib/ directory.
For more information see https://pub.dev/packages/record_use.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited