call method

T call(
  1. double p1, [
  2. double? p2,
  3. double? p3,
  4. double? p4,
])

Implementation

T call(double p1, [double? p2, double? p3, double? p4]) {
  double topLeft = p1;
  double topRight = p1;
  double bottomLeft = p1;
  double bottomRight = p1;

  if (p2 != null) {
    bottomRight = p2;
    bottomLeft = p2;
  }

  if (p3 != null) {
    topLeft = p1;
    topRight = p2!;
    bottomLeft = p2;
    bottomRight = p3;
  }

  if (p4 != null) {
    topLeft = p1;
    topRight = p2!;
    bottomLeft = p3!;
    bottomRight = p4;
  }

  return only(
    topLeft: Radius.circular(topLeft),
    topRight: Radius.circular(topRight),
    bottomLeft: Radius.circular(bottomLeft),
    bottomRight: Radius.circular(bottomRight),
  );
}