copyWith method

Area copyWith({
  1. Point<double>? topLeft,
  2. Point<double>? topRight,
  3. Point<double>? bottomLeft,
  4. Point<double>? bottomRight,
})

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

Implementation

Area copyWith({
  Point<double>? topLeft,
  Point<double>? topRight,
  Point<double>? bottomLeft,
  Point<double>? bottomRight,
}) {
  return Area(
    topLeft: topLeft ?? this.topLeft,
    topRight: topRight ?? this.topRight,
    bottomLeft: bottomLeft ?? this.bottomLeft,
    bottomRight: bottomRight ?? this.bottomRight,
  );
}