CommandPayloadDefinition class abstract

Available extensions
Annotations
  • @freezed

Constructors

CommandPayloadDefinition({required String parameter, String? description, @CommandPayloadDataTypeConverter() required CommandPayloadDataType dataType, bool? isRequired, num? minValue, num? maxValue, int? minLength, int? maxLength, List<String>? choices, @RegExpOrNullConverter() RegExp? regexPattern, List<CommandPayloadDefinition>? nested, int? maxQuantity})
const
factory
CommandPayloadDefinition.fromJson(Map<String, dynamic> json)
factory

Properties

choices List<String>?
choices is the list of choices of the parameter. Only for CommandPayloadDataType.choice
no setterinherited
copyWith → $CommandPayloadDefinitionCopyWith<CommandPayloadDefinition>
Create a copy of CommandPayloadDefinition with the given fields replaced by the non-null parameter values.
no setterinherited
dataType CommandPayloadDataType
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
isRequired bool?
isRequired is the parameter is required.
no setterinherited
maxLength int?
maxLength is the maximum length of the parameter. Only for CommandPayloadDataType.string
no setterinherited
maxQuantity int?
maxQuantity is the maximum quantity of the nested parameters.
no setterinherited
maxValue num?
maxValue is the maximum value of the parameter. Only for CommandPayloadDataType.integer and CommandPayloadDataType.float
no setterinherited
minLength int?
minLength is the minimum length of the parameter. Only for CommandPayloadDataType.string
no setterinherited
minValue num?
minValue is the minimum value of the parameter. Only for CommandPayloadDataType.integer and CommandPayloadDataType.float
no setterinherited
nested List<CommandPayloadDefinition>?
nested is the nested object of the parameter. Only for CommandPayloadDataType.nested
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

Methods

map<TResult extends Object?>(TResult $default(_CommandPayloadDefinition value)) → TResult

Available on CommandPayloadDefinition, provided by the CommandPayloadDefinitionPatterns extension

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

Available on CommandPayloadDefinition, provided by the CommandPayloadDefinitionPatterns extension

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

Available on CommandPayloadDefinition, provided by the CommandPayloadDefinitionPatterns extension

A variant of map that fallback to returning orElse.
maybeWhen<TResult extends Object?>(TResult $default(String parameter, String? description, CommandPayloadDataType dataType, bool? isRequired, num? minValue, num? maxValue, int? minLength, int? maxLength, List<String>? choices, RegExp? regexPattern, List<CommandPayloadDefinition>? nested, int? maxQuantity)?, {required TResult orElse()}) → TResult

Available on CommandPayloadDefinition, provided by the CommandPayloadDefinitionPatterns 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 CommandPayloadDefinition to a JSON map.
inherited
toString() String
A string representation of this object.
inherited
when<TResult extends Object?>(TResult $default(String parameter, String? description, CommandPayloadDataType dataType, bool? isRequired, num? minValue, num? maxValue, int? minLength, int? maxLength, List<String>? choices, RegExp? regexPattern, List<CommandPayloadDefinition>? nested, int? maxQuantity)) → TResult

Available on CommandPayloadDefinition, provided by the CommandPayloadDefinitionPatterns extension

A switch-like method, using callbacks.
whenOrNull<TResult extends Object?>(TResult? $default(String parameter, String? description, CommandPayloadDataType dataType, bool? isRequired, num? minValue, num? maxValue, int? minLength, int? maxLength, List<String>? choices, RegExp? regexPattern, List<CommandPayloadDefinition>? nested, int? maxQuantity)?) → TResult?

Available on CommandPayloadDefinition, provided by the CommandPayloadDefinitionPatterns extension

A variant of when that fallback to returning null

Operators

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