copyWith method

Result copyWith({
  1. bool? isValid,
  2. List<Expectation>? expectations,
  3. dynamic value,
})

Creates a copy of the result with the given parameters.

Implementation

Result copyWith({
  bool? isValid,
  List<Expectation>? expectations,
  dynamic value,
}) {
  return Result(
    isValid: isValid ?? this.isValid,
    expectations: expectations ?? this.expectations,
    value: value ?? this.value,
  );
}