ParameterConstraints.fromJson constructor

ParameterConstraints.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory ParameterConstraints.fromJson(Map<String, dynamic> json) {
  return ParameterConstraints(
    allowedPattern: json['AllowedPattern'] as String?,
    allowedValues: (json['AllowedValues'] as List?)
        ?.whereNotNull()
        .map((e) => e as String)
        .toList(),
    constraintDescription: json['ConstraintDescription'] as String?,
    maxLength: json['MaxLength'] as String?,
    maxValue: json['MaxValue'] as String?,
    minLength: json['MinLength'] as String?,
    minValue: json['MinValue'] as String?,
  );
}