copyWith method

PostModel copyWith({
  1. String? kind,
  2. List<PostItemModel>? items,
  3. String? etag,
  4. String? error,
})

Implementation

PostModel copyWith({
  String? kind,
  List<PostItemModel>? items,
  String? etag,
  String? error,
}) {
  return PostModel(
    kind: kind ?? this.kind,
    items: items ?? this.items,
    etag: etag ?? this.etag,
    error: error ?? this.error,
  );
}