copyWith method

InterleavedOverlayLayer copyWith({
  1. int? activationOrder,
  2. int? stackLevel,
  3. InterleavedLayerBuilder? builder,
})

Creates a new instance with selective overrides (keeps immutability).

Implementation

InterleavedOverlayLayer copyWith({
  int? activationOrder,
  int? stackLevel,
  InterleavedLayerBuilder? builder,
}) {
  // Preserve the layer id while optionally updating other fields.
  return InterleavedOverlayLayer(
    id: id,
    activationOrder: activationOrder ?? this.activationOrder,
    stackLevel: stackLevel ?? this.stackLevel,
    builder: builder ?? this.builder,
  );
}