copyWith method
OverlayMorphState
copyWith({
- double? overlayProgress,
- double? expandProgress,
- OverlayPhase? phase,
- int? currentIndex,
- int? itemCount,
- Object? selectedItem,
- bool clearSelection = false,
- Rect? originRect,
- bool clearOriginRect = false,
- Rect? cardRect,
- bool clearCardRect = false,
- Rect? fullscreenRect,
- bool? isDragging,
- bool? isAnimating,
- double? velocity,
- double? horizontalDragOffset,
Implementation
OverlayMorphState copyWith({
double? overlayProgress,
double? expandProgress,
OverlayPhase? phase,
int? currentIndex,
int? itemCount,
Object? selectedItem,
bool clearSelection = false,
Rect? originRect,
bool clearOriginRect = false,
Rect? cardRect,
bool clearCardRect = false,
Rect? fullscreenRect,
bool? isDragging,
bool? isAnimating,
double? velocity,
double? horizontalDragOffset,
}) {
return OverlayMorphState(
overlayProgress: overlayProgress ?? this.overlayProgress,
expandProgress: expandProgress ?? this.expandProgress,
phase: phase ?? this.phase,
currentIndex: currentIndex ?? this.currentIndex,
itemCount: itemCount ?? this.itemCount,
selectedItem:
clearSelection ? null : (selectedItem ?? this.selectedItem),
originRect:
clearOriginRect ? null : (originRect ?? this.originRect),
cardRect: clearCardRect ? null : (cardRect ?? this.cardRect),
fullscreenRect: fullscreenRect ?? this.fullscreenRect,
isDragging: isDragging ?? this.isDragging,
isAnimating: isAnimating ?? this.isAnimating,
velocity: velocity ?? this.velocity,
horizontalDragOffset:
horizontalDragOffset ?? this.horizontalDragOffset,
);
}