TenvioCustomProperty class abstract

Available extensions
Annotations
  • @freezed

Constructors

TenvioCustomProperty({required String name, @TenvioPropertyDataTypeConverter() required TenvioPropertyDataType dataType, @Default.new(false) bool isRequired, @Default.new([]) List<String> choices, double? minValue, double? maxValue, int? minLength, int? maxLength, int? maxFileSize, dynamic defaultValue})
TenvioCustomProperty represents a custom property of an item. This properties can be used to store additional information about the item and it's up to the user to define them.
const
factory
TenvioCustomProperty.fromJson(Map<String, dynamic> json)
factory

Properties

choices List<String>
choices is a list of choices for the property. This property is only available when the data type is TenvioPropertyDataType.choice or TenvioPropertyDataType.mutipleChoices.
no setterinherited
copyWith → $TenvioCustomPropertyCopyWith<TenvioCustomProperty>
Create a copy of TenvioCustomProperty with the given fields replaced by the non-null parameter values.
no setterinherited
dataType TenvioPropertyDataType
dataType is the data type of the property.
no setterinherited
defaultValue → dynamic
defaultValue is the default value for the property.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
isRequired bool
isRequired is a flag that indicates if the property is required.
no setterinherited
maxFileSize int?
maxFileSize is the maximum file size for the property. This property is only available when the data type is TenvioPropertyDataType.file.
no setterinherited
maxLength int?
maxLength is the maximum length for the property. This property is only available when the data type is TenvioPropertyDataType.string.
no setterinherited
maxValue double?
maxValue is the maximum value for the property. This property is only available when the data type is TenvioPropertyDataType.number.
no setterinherited
minLength int?
minLength is the minimum length for the property. This property is only available when the data type is TenvioPropertyDataType.string.
no setterinherited
minValue double?
minValue is the minimum value for the property. This property is only available when the data type is TenvioPropertyDataType.number.
no setterinherited
name String
name is the name of the item.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

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

Available on TenvioCustomProperty, provided by the TenvioCustomPropertyPatterns extension

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

Available on TenvioCustomProperty, provided by the TenvioCustomPropertyPatterns extension

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

Available on TenvioCustomProperty, provided by the TenvioCustomPropertyPatterns extension

A variant of map that fallback to returning orElse.
maybeWhen<TResult extends Object?>(TResult $default(String name, TenvioPropertyDataType dataType, bool isRequired, List<String> choices, double? minValue, double? maxValue, int? minLength, int? maxLength, int? maxFileSize, dynamic defaultValue)?, {required TResult orElse()}) → TResult

Available on TenvioCustomProperty, provided by the TenvioCustomPropertyPatterns 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 TenvioCustomProperty to a JSON map.
inherited
toString() String
A string representation of this object.
inherited
when<TResult extends Object?>(TResult $default(String name, TenvioPropertyDataType dataType, bool isRequired, List<String> choices, double? minValue, double? maxValue, int? minLength, int? maxLength, int? maxFileSize, dynamic defaultValue)) → TResult

Available on TenvioCustomProperty, provided by the TenvioCustomPropertyPatterns extension

A switch-like method, using callbacks.
whenOrNull<TResult extends Object?>(TResult? $default(String name, TenvioPropertyDataType dataType, bool isRequired, List<String> choices, double? minValue, double? maxValue, int? minLength, int? maxLength, int? maxFileSize, dynamic defaultValue)?) → TResult?

Available on TenvioCustomProperty, provided by the TenvioCustomPropertyPatterns extension

A variant of when that fallback to returning null

Operators

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