RuleOrId.fromJson constructor

RuleOrId.fromJson(
  1. Object? json
)

Implementation

factory RuleOrId.fromJson(Object? json) {
  if (json is String) {
    return RuleId(id: json);
  }
  return Rule.fromJson(json);
}