copyWith method

  1. @override
TSimpleOperation copyWith({
  1. List<String>? operands,
  2. String? operator,
  3. String? result,
  4. bool? isLastOperandPercent,
})
override

Creates a copy of the current operation with the specified operands, operator, and result.

Implementation

@override
TSimpleOperation copyWith({
  List<String>? operands,
  String? operator,
  String? result,
  bool? isLastOperandPercent,
}) {
  return TSimpleOperation(
    operands: operands ?? this.operands,
    operator: operator ?? this.operator,
    result: result ?? this.result,
    isLastOperandPercent: isLastOperandPercent ?? this.isLastOperandPercent,
  );
}