Criterion.fromJson constructor

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

Implementation

factory Criterion.fromJson(Map<String, dynamic> json) {
  return Criterion(
    contains: (json['contains'] as List?)
        ?.whereNotNull()
        .map((e) => e as String)
        .toList(),
    eq: (json['eq'] as List?)
        ?.whereNotNull()
        .map((e) => e as String)
        .toList(),
    exists: json['exists'] as bool?,
    neq: (json['neq'] as List?)
        ?.whereNotNull()
        .map((e) => e as String)
        .toList(),
  );
}