toModel method

Map<String, Object?> toModel()

Implementation

Map<String, Object?> toModel() {
  return {
    if (alert != null) 'alert': alert?.toModel(),
    if (badge != null) 'badge': badge,
    if (sound != null) 'sound': sound,
    if (contentAvailable != null) 'content-available': contentAvailable,
    if (mutableContent != null) 'mutable-content': mutableContent,
    if (category != null) 'category': category,
    if (threadId != null) 'thread-id': threadId,
    if (interruptionLevel != null) 'interruption-level': interruptionLevel,
  }.cleanBools();
}