CredentialField class abstract

Available extensions
Annotations
  • @freezed

Constructors

CredentialField({required String field, @CredentialFieldTypeConverter() required CredentialFieldType type, int? maxLength, int? minLength, num? maxValue, num? minValue, List<String>? choices, String? onlyField, List<String>? onlyChoices, @CredentialFieldActionConverter() CredentialFieldAction? action, List<CredentialField>? requiredFields})
const
factory
CredentialField.fromJson(Map<String, dynamic> json)
factory

Properties

action CredentialFieldAction?
action defines the action to show in the field (as suffix icon).
no setterinherited
choices List<String>?
choices is the list of possible choices for the field, only used in type = CredentialFieldType.choices.
no setterinherited
copyWith → $CredentialFieldCopyWith<CredentialField>
Create a copy of CredentialField with the given fields replaced by the non-null parameter values.
no setterinherited
field String
field is the name of the field, is a translation key.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
maxLength int?
maxLength is the maximum length of the field, only used in type = CredentialFieldType.string.
no setterinherited
maxValue num?
maxValue is the maximum value of the field, only used in type = CredentialFieldType.integer or CredentialFieldType.float.
no setterinherited
minLength int?
minLength is the minimum length of the field, only used in type = CredentialFieldType.string.
no setterinherited
minValue num?
minValue is the minimum value of the field, only used in type = CredentialFieldType.integer or CredentialFieldType.float.
no setterinherited
onlyChoices List<String>?
onlyChoices is the list of possible choices for the field, only used in type = CredentialFieldType.choices.
no setterinherited
onlyField String?
onlyField is the name of the field that must be present in the object, only used in type = CredentialFieldType.choices.
no setterinherited
requiredFields List<CredentialField>?
requiredFields represents the nested fields. Only used when type = CredentialFieldType.nestedField.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
type CredentialFieldType
type is the type of the field.
no setterinherited

Methods

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

Available on CredentialField, provided by the CredentialFieldPatterns extension

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

Available on CredentialField, provided by the CredentialFieldPatterns extension

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

Available on CredentialField, provided by the CredentialFieldPatterns extension

A variant of map that fallback to returning orElse.
maybeWhen<TResult extends Object?>(TResult $default(String field, CredentialFieldType type, int? maxLength, int? minLength, num? maxValue, num? minValue, List<String>? choices, String? onlyField, List<String>? onlyChoices, CredentialFieldAction? action, List<CredentialField>? requiredFields)?, {required TResult orElse()}) → TResult

Available on CredentialField, provided by the CredentialFieldPatterns 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 CredentialField to a JSON map.
inherited
toString() String
A string representation of this object.
inherited
when<TResult extends Object?>(TResult $default(String field, CredentialFieldType type, int? maxLength, int? minLength, num? maxValue, num? minValue, List<String>? choices, String? onlyField, List<String>? onlyChoices, CredentialFieldAction? action, List<CredentialField>? requiredFields)) → TResult

Available on CredentialField, provided by the CredentialFieldPatterns extension

A switch-like method, using callbacks.
whenOrNull<TResult extends Object?>(TResult? $default(String field, CredentialFieldType type, int? maxLength, int? minLength, num? maxValue, num? minValue, List<String>? choices, String? onlyField, List<String>? onlyChoices, CredentialFieldAction? action, List<CredentialField>? requiredFields)?) → TResult?

Available on CredentialField, provided by the CredentialFieldPatterns extension

A variant of when that fallback to returning null

Operators

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