fromJson static method

IFactAgent? fromJson(
  1. dynamic data
)

Implementation

static IFactAgent? fromJson(dynamic data) {
  if (data == null) return null;
  switch ("$data") {
    case "NEITHER": return IFactAgent.neither_;
    case "BOTH": return IFactAgent.both_;
    case "USER": return IFactAgent.user_;
    case "SUBJECT": return IFactAgent.subject_;
    default: return FactAgent.unknown("$data");
  }
}