of static method

PushMessage of({
  1. required String? recipient,
  2. bool? isUserId = false,
  3. bool? isNativePush = false,
  4. INotification? notification,
  5. IMessageBody? body,
  6. required IPushMessageType? type,
})

Implementation

static PushMessage of({
  required String? recipient,
  bool? isUserId = false,
  bool? isNativePush = false,
  INotification? notification,
  IMessageBody? body,
  required IPushMessageType? type
  }) {
  final self = PushMessage(<String, dynamic>{}, mtype: PushMessageRef, update: true);
  if (recipient != null) self.recipient = recipient;
  if (isUserId != null) self.isUserId = isUserId;
  if (isNativePush != null) self.isNativePush = isNativePush;
  if (notification != null) self.notification = notification;
  if (body != null) self.body = body;
  if (type != null) self.type = type;
  return self;
}