Macro class Get started Installation Models Data Class Macro Compute Macro Asset Path Macro Shader Reloader Macro Global Configuration Write New Macro Capability
Macro used to attach metadata to a Dart declaration.
A Macro defines:
- which code generator should run, and
- whether its output should be merged with other macros applied to the same declaration.
Constructors
- Macro(MacroGenerator generator, {bool combine = false})
-
const
Properties
- combine → bool
-
Whether this macro's generated code should be merged with code
produced by other macros applied to the same class or mixin.
final
- generator → MacroGenerator
-
The macro code generator responsible for producing the output.
final
- 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
Static Methods
-
parseMacroConfig<
T> ({required Object? value, required T fn(Map< String, dynamic> json), required T defaultValue}) → T