MDNotification constructor

MDNotification({
  1. required String senderID,
  2. required String message,
  3. required String title,
  4. required String details,
  5. required String procedureName,
  6. String state = '0',
  7. String? userID,
  8. String? topic,
})

Implementation

MDNotification({
  required this.senderID,
  required this.message,
  required this.title,
  required this.details,
  required this.procedureName,
  this.state='0',
  this.userID,
  this.topic,
}) {
  if (topic == null && userID == null) {
    throw Exception('Topic or UserID must be provided');
  }else if(topic != null && userID != null){
    throw Exception('Only one of Topic or UserID must be provided');
  }
}