NamedArg class final

Represents a named argument in a custom attribute, targeting a field or property.

Inheritance
Available extensions

Constructors

NamedArg({required String name, required MetadataValue value})
Creates a named argument with the given name and value.
const

Properties

hashCode int
The hash code for this object.
no setteroverride
name String
The name of the target property or field.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value MetadataValue
The value of the argument.
finalinherited
valueAsBool bool?

Available on AttributeArg, provided by the AttributeArgExtension extension

Returns the value as a bool if possible, otherwise null.
no setter
valueAsDouble double?

Available on AttributeArg, provided by the AttributeArgExtension extension

Returns the value as a double if possible, otherwise null.
no setter
valueAsInt int?

Available on AttributeArg, provided by the AttributeArgExtension extension

Returns the value as an int if possible, otherwise null.
no setter
valueAsString String?

Available on AttributeArg, provided by the AttributeArgExtension extension

Returns the value as a String if possible, otherwise null.
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override