fromString method

PushRuleKind? fromString(
  1. String val
)

Implementation

PushRuleKind? fromString(String val) {
  final override = {
    'content': PushRuleKind.content,
    'override': PushRuleKind.override,
    'room': PushRuleKind.room,
    'sender': PushRuleKind.sender,
    'underride': PushRuleKind.underride,
  }[val];
// ignore: unnecessary_this
  return this.contains(override) ? override : null;
}