copyWith method

VideoEditValues copyWith({
  1. Duration? trimStart,
  2. Duration? trimEnd,
  3. bool? muted,
  4. VideoCropGeometry? crop,
  5. VideoDrawOverlay? overlay,
  6. bool clearTrimStart = false,
  7. bool clearTrimEnd = false,
  8. bool clearCrop = false,
  9. bool clearOverlay = false,
})

These values with the given fields replaced.

Implementation

VideoEditValues copyWith({
  Duration? trimStart,
  Duration? trimEnd,
  bool? muted,
  VideoCropGeometry? crop,
  VideoDrawOverlay? overlay,
  bool clearTrimStart = false,
  bool clearTrimEnd = false,
  bool clearCrop = false,
  bool clearOverlay = false,
}) {
  return VideoEditValues(
    trimStart: clearTrimStart ? null : (trimStart ?? this.trimStart),
    trimEnd: clearTrimEnd ? null : (trimEnd ?? this.trimEnd),
    muted: muted ?? this.muted,
    crop: clearCrop ? null : (crop ?? this.crop),
    overlay: clearOverlay ? null : (overlay ?? this.overlay),
  );
}