Name class

Gives a @ConfigurationProperties field or constructor parameter a property name other than its Dart name.

Needed when the property name is a Dart keyword (import, default) or when the field should have a clearer name than the property. The value is one element of the name, turned to dashed form like a Dart name (maxSize reads max-size).

@ConfigurationProperties('app')
class AppProperties {
  AppProperties(@Name('import') this.importSettings);
  final String importSettings; // app.import
}

Spring (Java):

public record AppProperties(@Name("import") String importSettings) {}

Constructors

Name(String value)
Binds the field from the property value under the prefix.
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
value → String
The property name, one element without dots, such as import or max-size.
final

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