copyWith method
If you want to change the modifier value, use copyWithModifierValue instead.
Otherwise, use copyWith to change the modifier sign, as this class is immutable,
and the sign is determined by the modifier value.
Implementation
Dice copyWith({
int? amount,
int? sides,
int? modifierValue,
String? modifierSign,
String? modifierStat,
}) =>
Dice(
amount: amount ?? this.amount,
sides: sides ?? this.sides,
modifierSign: modifierSign ?? this.modifierSign,
modifierValue: modifierValue ?? this.modifierValue,
modifierStat: modifierStat ?? this.modifierStat,
);