copyWith method

MixedFraction copyWith({
  1. int? whole,
  2. int? numerator,
  3. int? denominator,
})

Creates a deep copy of this object with the given fields replaced with the new values.

Implementation

MixedFraction copyWith({
  int? whole,
  int? numerator,
  int? denominator,
}) =>
    MixedFraction(
      whole: whole ?? this.whole,
      numerator: numerator ?? this.numerator,
      denominator: denominator ?? this.denominator,
    );