Condition.fromJson constructor

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

Implementation

factory Condition.fromJson(Map<String, dynamic> json) {
  return Condition(
    eq: (json['eq'] as List?)
        ?.whereNotNull()
        .map((e) => e as String)
        .toList(),
    equals: (json['equals'] as List?)
        ?.whereNotNull()
        .map((e) => e as String)
        .toList(),
    greaterThan: json['greaterThan'] as int?,
    greaterThanOrEqual: json['greaterThanOrEqual'] as int?,
    gt: json['gt'] as int?,
    gte: json['gte'] as int?,
    lessThan: json['lessThan'] as int?,
    lessThanOrEqual: json['lessThanOrEqual'] as int?,
    lt: json['lt'] as int?,
    lte: json['lte'] as int?,
    neq: (json['neq'] as List?)
        ?.whereNotNull()
        .map((e) => e as String)
        .toList(),
    notEquals: (json['notEquals'] as List?)
        ?.whereNotNull()
        .map((e) => e as String)
        .toList(),
  );
}