ConfigDefinition class abstract
- Available extensions
- Annotations
-
- @freezed
Constructors
-
ConfigDefinition({@JsonKey.new(unknownEnumValue: ConfigSource.unknown) List<
ConfigSource> ? sources, required String parameter, String? description, @JsonKey.new(unknownEnumValue: ConfigPayloadDataType.unknown) ConfigPayloadDataType? dataType, num? minValue, num? maxValue, int? minLength, int? maxLength, List<String> ? choices, @RegExpOrNullConverter() RegExp? regexPattern, bool? setupCapable}) -
ConfigDefinition is the definition of a parameter or a grouping of parameters.
constfactory
-
ConfigDefinition.fromJson(Map<
String, dynamic> json) -
factory
Properties
-
choices
→ List<
String> ? -
choicesis the list of choices of the parameter. Only for ConfigPayloadDataType.choiceno setterinherited -
copyWith
→ $ConfigDefinitionCopyWith<
ConfigDefinition> -
Create a copy of ConfigDefinition
with the given fields replaced by the non-null parameter values.
no setterinherited
- dataType → ConfigPayloadDataType?
-
dataTypeis the data type of the parameter.no setterinherited - description → String?
-
descriptionis the fallback name of the parameter, when the translation is not available.no setterinherited - hashCode → int
-
The hash code for this object.
no setterinherited
- maxLength → int?
-
maxLengthis the maximum length of the parameter. Only for ConfigPayloadDataType.stringno setterinherited - maxValue → num?
-
maxValueis the maximum value of the parameter. Only for ConfigPayloadDataType.integer and ConfigPayloadDataType.floatno setterinherited - minLength → int?
-
minLengthis the minimum length of the parameter. Only for ConfigPayloadDataType.stringno setterinherited - minValue → num?
-
minValueis the minimum value of the parameter. Only for ConfigPayloadDataType.integer and ConfigPayloadDataType.floatno setterinherited - parameter → String
-
parameteris the name of the parameter, this is also the translation key.no setterinherited - regexPattern → RegExp?
-
regexPatternis the regex pattern of the parameter.no setterinherited - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- setupCapable → bool?
-
setupCapableis the flag that indicates if the parameter is capable of being set up.no setterinherited -
sources
→ List<
ConfigSource> ? -
sourcesis the list of sources that the command can be executed.no setterinherited
Methods
-
map<
TResult extends Object?> (TResult $default(_ConfigDefinition value)) → TResult -
Available on ConfigDefinition, provided by the ConfigDefinitionPatterns extension
Aswitch-like method, using callbacks. -
mapOrNull<
TResult extends Object?> (TResult? $default(_ConfigDefinition value)?) → TResult? -
Available on ConfigDefinition, provided by the ConfigDefinitionPatterns extension
A variant ofmapthat fallback to returningnull. -
maybeMap<
TResult extends Object?> (TResult $default(_ConfigDefinition value)?, {required TResult orElse()}) → TResult -
Available on ConfigDefinition, provided by the ConfigDefinitionPatterns extension
A variant ofmapthat fallback to returningorElse. -
maybeWhen<
TResult extends Object?> (TResult $default(List< ConfigSource> ? sources, String parameter, String? description, ConfigPayloadDataType? dataType, num? minValue, num? maxValue, int? minLength, int? maxLength, List<String> ? choices, RegExp? regexPattern, bool? setupCapable)?, {required TResult orElse()}) → TResult -
Available on ConfigDefinition, provided by the ConfigDefinitionPatterns extension
A variant ofwhenthat fallback to anorElsecallback. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Serializes this ConfigDefinition to a JSON map.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
when<
TResult extends Object?> (TResult $default(List< ConfigSource> ? sources, String parameter, String? description, ConfigPayloadDataType? dataType, num? minValue, num? maxValue, int? minLength, int? maxLength, List<String> ? choices, RegExp? regexPattern, bool? setupCapable)) → TResult -
Available on ConfigDefinition, provided by the ConfigDefinitionPatterns extension
Aswitch-like method, using callbacks. -
whenOrNull<
TResult extends Object?> (TResult? $default(List< ConfigSource> ? sources, String parameter, String? description, ConfigPayloadDataType? dataType, num? minValue, num? maxValue, int? minLength, int? maxLength, List<String> ? choices, RegExp? regexPattern, bool? setupCapable)?) → TResult? -
Available on ConfigDefinition, provided by the ConfigDefinitionPatterns extension
A variant ofwhenthat fallback to returningnull
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited