FieldDependencyRule.fromJson constructor

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

Implementation

factory FieldDependencyRule.fromJson(Map<String, dynamic> json) =>
    FieldDependencyRule(
      type: FieldDependencyRuleType.fromString(
        json['type'] as String? ?? 'visibleIf',
      ),
      field: json['field'] as String? ?? '',
      message: json['message'] as String? ?? '',
      operator: getConditionOperator(json['operator'] as String? ?? 'equals'),
      compareValue: json['compareValue'],
    );