copyWith method Null safety

ViewConfiguration copyWith(
  1. {FlutterView? window,
  2. double? devicePixelRatio,
  3. Rect? geometry,
  4. bool? visible,
  5. WindowPadding? viewInsets,
  6. WindowPadding? viewPadding,
  7. WindowPadding? systemGestureInsets,
  8. WindowPadding? padding,
  9. GestureSettings? gestureSettings,
  10. List<DisplayFeature>? displayFeatures}
)

Copy this configuration with some fields replaced.

Implementation

ViewConfiguration copyWith({
  FlutterView? window,
  double? devicePixelRatio,
  Rect? geometry,
  bool? visible,
  WindowPadding? viewInsets,
  WindowPadding? viewPadding,
  WindowPadding? systemGestureInsets,
  WindowPadding? padding,
  GestureSettings? gestureSettings,
  List<DisplayFeature>? displayFeatures,
}) {
  return ViewConfiguration(
    window: window ?? this.window,
    devicePixelRatio: devicePixelRatio ?? this.devicePixelRatio,
    geometry: geometry ?? this.geometry,
    visible: visible ?? this.visible,
    viewInsets: viewInsets ?? this.viewInsets,
    viewPadding: viewPadding ?? this.viewPadding,
    systemGestureInsets: systemGestureInsets ?? this.systemGestureInsets,
    padding: padding ?? this.padding,
    gestureSettings: gestureSettings ?? this.gestureSettings,
    displayFeatures: displayFeatures ?? this.displayFeatures,
  );
}