copyWith method

Margin copyWith({
  1. double? top,
  2. double? right,
  3. double? bottom,
  4. double? left,
})

Creates a copy with updated values.

Implementation

Margin copyWith({
  double? top,
  double? right,
  double? bottom,
  double? left,
}) {
  return Margin(
    top: top ?? this.top,
    right: right ?? this.right,
    bottom: bottom ?? this.bottom,
    left: left ?? this.left,
  );
}