PushRule.fromJson constructor

PushRule.fromJson(
  1. Map<String, Object?> json
)

Implementation

PushRule.fromJson(Map<String, Object?> json)
  : actions = (json['actions'] as List).map((v) => v as Object?).toList(),
    conditions = ((v) => v != null
        ? (v as List)
              .map((v) => PushCondition.fromJson(v as Map<String, Object?>))
              .toList()
        : null)(json['conditions']),
    default$ = json['default'] as bool,
    enabled = json['enabled'] as bool,
    pattern = ((v) => v != null ? v as String : null)(json['pattern']),
    ruleId = json['rule_id'] as String;