Macro class

Annotation to mark code for macro processing.

The Macro annotation is used to indicate that a Dart element (class, method, field, etc.) should have macro processing applied to it.

This annotation provides configuration options for the macro processor:

Example usage:

@Macro(
  defines: {'DEBUG': 'true', 'VERSION': '"1.0.0"'},
  expandPredefined: true
)
class Config {
  // Code with macros to be processed
}

Constructors

Macro.new({Map<String, String>? defines, bool processIncludes = true, bool expandPredefined = true})
Creates a new Macro annotation with the specified configuration.
const

Properties

defines Map<String, String>?
Custom macro definitions to apply during processing
final
expandPredefined bool
Whether to expand predefined macros
final
hashCode int
The hash code for this object.
no setterinherited
processIncludes bool
Whether to process #include directives
final
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