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.
const
factory
ConfigDefinition.fromJson(Map<String, dynamic> json)
factory

Properties

choices List<String>?
choices is the list of choices of the parameter. Only for ConfigPayloadDataType.choice
no setterinherited
copyWith → $ConfigDefinitionCopyWith<ConfigDefinition>
Create a copy of ConfigDefinition with the given fields replaced by the non-null parameter values.
no setterinherited
dataType ConfigPayloadDataType?
dataType is the data type of the parameter.
no setterinherited
description String?
description is 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?
maxLength is the maximum length of the parameter. Only for ConfigPayloadDataType.string
no setterinherited
maxValue num?
maxValue is the maximum value of the parameter. Only for ConfigPayloadDataType.integer and ConfigPayloadDataType.float
no setterinherited
minLength int?
minLength is the minimum length of the parameter. Only for ConfigPayloadDataType.string
no setterinherited
minValue num?
minValue is the minimum value of the parameter. Only for ConfigPayloadDataType.integer and ConfigPayloadDataType.float
no setterinherited
parameter String
parameter is the name of the parameter, this is also the translation key.
no setterinherited
regexPattern RegExp?
regexPattern is the regex pattern of the parameter.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
setupCapable bool?
setupCapable is the flag that indicates if the parameter is capable of being set up.
no setterinherited
sources List<ConfigSource>?
sources is 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

A switch-like method, using callbacks.
mapOrNull<TResult extends Object?>(TResult? $default(_ConfigDefinition value)?) → TResult?

Available on ConfigDefinition, provided by the ConfigDefinitionPatterns extension

A variant of map that fallback to returning null.
maybeMap<TResult extends Object?>(TResult $default(_ConfigDefinition value)?, {required TResult orElse()}) → TResult

Available on ConfigDefinition, provided by the ConfigDefinitionPatterns extension

A variant of map that fallback to returning orElse.
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 of when that fallback to an orElse callback.
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

A switch-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 of when that fallback to returning null

Operators

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