copyWith method

Rails copyWith({
  1. String? type,
  2. String? name,
  3. List<Contents>? contents,
  4. int? currentCarouselIndex,
  5. Data? data,
})

Implementation

Rails copyWith({
  String? type,
  String? name,
  List<Contents>? contents,
  int? currentCarouselIndex,
  Data? data,
}) {
  return Rails(
    type: type ?? this.type,
    name: name ?? this.name,
    contents: contents ?? this.contents,
    currentCarouselIndex: currentCarouselIndex ?? this.currentCarouselIndex,
    data: data ?? this.data,
  );
}