copyWith method

NotificationViewModel copyWith({
  1. int? id,
  2. String? guid,
  3. String? title,
  4. NotificationTypes? type,
  5. Map<String, dynamic>? metadata,
  6. DateTime? seenAt,
  7. DateTime? createdAt,
})

Implementation

NotificationViewModel copyWith(
    {int? id,
    String? guid,
    String? title,
    enums.NotificationTypes? type,
    Map<String, dynamic>? metadata,
    DateTime? seenAt,
    DateTime? createdAt}) {
  return NotificationViewModel(
      id: id ?? this.id,
      guid: guid ?? this.guid,
      title: title ?? this.title,
      type: type ?? this.type,
      metadata: metadata ?? this.metadata,
      seenAt: seenAt ?? this.seenAt,
      createdAt: createdAt ?? this.createdAt);
}