copyWith method

StacCache copyWith({
  1. String? name,
  2. String? stacJson,
  3. int? version,
  4. DateTime? cachedAt,
})

Creates a copy of this StacCache with the given fields replaced.

Implementation

StacCache copyWith({
  String? name,
  String? stacJson,
  int? version,
  DateTime? cachedAt,
}) {
  return StacCache(
    name: name ?? this.name,
    stacJson: stacJson ?? this.stacJson,
    version: version ?? this.version,
    cachedAt: cachedAt ?? this.cachedAt,
  );
}