copyWith method
Returns a copy with the given fields replaced. For a nullable
field pass a function, e.g. field: () => null to clear it.
Implementation
Game copyWith({
int? id,
String? shortName,
String? title,
FormattedText? text,
String? description,
Photo? photo,
Animation? Function()? animation,
}) =>
Game(
id: id ?? this.id,
shortName: shortName ?? this.shortName,
title: title ?? this.title,
text: text ?? this.text,
description: description ?? this.description,
photo: photo ?? this.photo,
animation: animation != null ? animation() : this.animation,
);