copyWith method

  1. @override
MessageDice copyWith({
  1. DiceStickers? initialState()?,
  2. DiceStickers? finalState()?,
  3. String? emoji,
  4. int? value,
  5. int? successAnimationFrameNumber,
})
override

Returns a copy with the given fields replaced. For a nullable field pass a function, e.g. field: () => null to clear it.

Implementation

@override
MessageDice copyWith({
  DiceStickers? Function()? initialState,
  DiceStickers? Function()? finalState,
  String? emoji,
  int? value,
  int? successAnimationFrameNumber,
}) => MessageDice(
  initialState: initialState != null ? initialState() : this.initialState,
  finalState: finalState != null ? finalState() : this.finalState,
  emoji: emoji ?? this.emoji,
  value: value ?? this.value,
  successAnimationFrameNumber:
      successAnimationFrameNumber ?? this.successAnimationFrameNumber,
);