PropertyValues class

What the editor offers for a field of a @ConfigurationProperties class: fixed values for a String field that must stay a String, or a provider that lists them at run time.

Prefer an enum field: its constants are listed automatically, with their /// text. Nothing is checked at run time.

/// The log pattern flavour.
@PropertyValues(['plain', 'json'])
String format = 'plain';

/// The active profiles.
@PropertyValues.provider('profiles')
List<String> active = [];

Constructors

PropertyValues(List<String> values)
Offers values in the editor.
const
PropertyValues.provider(String provider)
Lets the editor ask the provider named provider for the values; profiles lists the profiles of the project.
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
provider → String?
The name of the value provider, or null.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
values → List<String>
The suggested values (none with a provider).
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