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.
constfactory
-
TenvioCustomProperty.fromJson(Map<
String, dynamic> json) -
factory
Properties
-
choices
→ List<
String> -
choicesis 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
-
dataTypeis the data type of the property.no setterinherited - defaultValue → dynamic
-
defaultValueis the default value for the property.no setterinherited - hashCode → int
-
The hash code for this object.
no setterinherited
- isRequired → bool
-
isRequiredis a flag that indicates if the property is required.no setterinherited - maxFileSize → int?
-
maxFileSizeis the maximum file size for the property. This property is only available when the data type is TenvioPropertyDataType.file.no setterinherited - maxLength → int?
-
maxLengthis the maximum length for the property. This property is only available when the data type is TenvioPropertyDataType.string.no setterinherited - maxValue → double?
-
maxValueis the maximum value for the property. This property is only available when the data type is TenvioPropertyDataType.number.no setterinherited - minLength → int?
-
minLengthis the minimum length for the property. This property is only available when the data type is TenvioPropertyDataType.string.no setterinherited - minValue → double?
-
minValueis the minimum value for the property. This property is only available when the data type is TenvioPropertyDataType.number.no setterinherited - name → String
-
nameis 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
Aswitch-like method, using callbacks. -
mapOrNull<
TResult extends Object?> (TResult? $default(_TenvioCustomProperty value)?) → TResult? -
Available on TenvioCustomProperty, provided by the TenvioCustomPropertyPatterns extension
A variant ofmapthat fallback to returningnull. -
maybeMap<
TResult extends Object?> (TResult $default(_TenvioCustomProperty value)?, {required TResult orElse()}) → TResult -
Available on TenvioCustomProperty, provided by the TenvioCustomPropertyPatterns extension
A variant ofmapthat fallback to returningorElse. -
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 ofwhenthat fallback to anorElsecallback. -
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
Aswitch-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 ofwhenthat fallback to returningnull
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited