copyWith method

LdFrameOptions copyWith({
  1. String? label,
  2. EdgeInsets? viewPaddig,
  3. Widget build(
    1. BuildContext context,
    2. Orientation orientation,
    3. Widget child,
    4. bool dark,
    5. SystemUiOverlayStyle navigationBarStyle,
    )?,
  4. double? width,
  5. double? height,
  6. double? devicePixelRatio,
  7. double? screenRadius,
  8. TargetPlatform? targetPlatform,
})

Creates a copy of this LdFrameOptions but with the given fields replaced by the new values.

This is useful for creating modified copies of default configurations (e.g. iPhone16Pro) without having to specify all fields again.

Implementation

LdFrameOptions copyWith({
  String? label,
  EdgeInsets? viewPaddig,
  Widget Function(
    BuildContext context,
    Orientation orientation,
    Widget child,
    bool dark,
    SystemUiOverlayStyle navigationBarStyle,
  )? build,
  double? width,
  double? height,
  double? devicePixelRatio,
  double? screenRadius,
  TargetPlatform? targetPlatform,
}) {
  return LdFrameOptions(
    label: label ?? this.label,
    viewPaddig: viewPaddig ?? this.viewPaddig,
    build: build ?? this.build,
    width: width ?? this.width,
    height: height ?? this.height,
    devicePixelRatio: devicePixelRatio ?? this.devicePixelRatio,
    screenRadius: screenRadius ?? this.screenRadius,
    targetPlatform: targetPlatform ?? this.targetPlatform,
  );
}