copyWithCompanion method

CacheItem copyWithCompanion(
  1. CacheItemsCompanion data
)

Implementation

CacheItem copyWithCompanion(CacheItemsCompanion data) {
  return CacheItem(
    key: data.key.present ? data.key.value : this.key,
    data: data.data.present ? data.data.value : this.data,
    createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt,
    expiresAt: data.expiresAt.present ? data.expiresAt.value : this.expiresAt,
    priority: data.priority.present ? data.priority.value : this.priority,
    size: data.size.present ? data.size.value : this.size,
  );
}