copyWith method

NegativeValueOptions copyWith({
  1. NegativeDisplayMode? mode,
  2. String? increasePrefix,
  3. String? decreasePrefix,
  4. String? increaseSuffix,
  5. String? decreaseSuffix,
  6. String? unchangedLabel,
  7. String customFormatter(
    1. double bytes,
    2. bool isNegative
    )?,
})

Creates a copy with modified options.

Implementation

NegativeValueOptions copyWith({
  NegativeDisplayMode? mode,
  String? increasePrefix,
  String? decreasePrefix,
  String? increaseSuffix,
  String? decreaseSuffix,
  String? unchangedLabel,
  String Function(double bytes, bool isNegative)? customFormatter,
}) {
  return NegativeValueOptions(
    mode: mode ?? this.mode,
    increasePrefix: increasePrefix ?? this.increasePrefix,
    decreasePrefix: decreasePrefix ?? this.decreasePrefix,
    increaseSuffix: increaseSuffix ?? this.increaseSuffix,
    decreaseSuffix: decreaseSuffix ?? this.decreaseSuffix,
    unchangedLabel: unchangedLabel ?? this.unchangedLabel,
    customFormatter: customFormatter ?? this.customFormatter,
  );
}