copyWith method

ThemeDraggableSheet copyWith({
  1. double? initialChildSize,
  2. double? minChildSize,
  3. double? maxChildSize,
  4. bool? expand,
  5. bool? snap,
  6. List<double>? snapSizes,
  7. Duration? snapAnimationDuration,
  8. bool? shouldCloseOnMinExtent,
})

Creates a copy of this ThemeDraggableSheet object with the given fields replaced with new values.

The copyWith method allows you to create a new instance of ThemeDraggableSheet with some properties updated while keeping the others unchanged.

Implementation

ThemeDraggableSheet copyWith({
  double? initialChildSize,
  double? minChildSize,
  double? maxChildSize,
  bool? expand,
  bool? snap,
  List<double>? snapSizes,
  Duration? snapAnimationDuration,
  bool? shouldCloseOnMinExtent,
}) {
  return ThemeDraggableSheet(
    initialChildSize: initialChildSize ?? this.initialChildSize,
    minChildSize: minChildSize ?? this.minChildSize,
    maxChildSize: maxChildSize ?? this.maxChildSize,
    expand: expand ?? this.expand,
    snap: snap ?? this.snap,
    snapSizes: snapSizes ?? this.snapSizes,
    snapAnimationDuration:
        snapAnimationDuration ?? this.snapAnimationDuration,
    shouldCloseOnMinExtent:
        shouldCloseOnMinExtent ?? this.shouldCloseOnMinExtent,
  );
}