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
UserRating copyWith({
int? level,
bool? isMaximumLevelReached,
int? rating,
int? currentLevelRating,
int? nextLevelRating,
}) => UserRating(
level: level ?? this.level,
isMaximumLevelReached: isMaximumLevelReached ?? this.isMaximumLevelReached,
rating: rating ?? this.rating,
currentLevelRating: currentLevelRating ?? this.currentLevelRating,
nextLevelRating: nextLevelRating ?? this.nextLevelRating,
);