copyWith method

VisualDensity copyWith({
  1. double? horizontal,
  2. double? vertical,
})

Copy the current VisualDensity with the given values replacing the current values.

Implementation

VisualDensity copyWith({
  double? horizontal,
  double? vertical,
}) {
  return VisualDensity(
    horizontal: horizontal ?? this.horizontal,
    vertical: vertical ?? this.vertical,
  );
}