EvaluatedPushRuleAction.fromActions constructor
EvaluatedPushRuleAction.fromActions(
- List actions
Implementation
EvaluatedPushRuleAction.fromActions(List<dynamic> actions) {
for (final action in actions) {
if (action == 'notify') {
notify = true;
} else if (action == 'dont_notify') {
notify = false;
} else if (action is Map<String, dynamic>) {
if (action['set_tweak'] == 'highlight') {
highlight = action.tryGet<bool>('value') ?? true;
} else if (action['set_tweak'] == 'sound') {
sound = action.tryGet<String>('value') ?? 'default';
}
}
}
}