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 topStart = p1;
  double topEnd = p1;
  double bottomStart = p1;
  double bottomEnd = p1;

  if (p2 != null) {
    bottomEnd = p2;
    bottomStart = p2;
  }

  if (p3 != null) {
    topStart = p1;
    topEnd = p2!;
    bottomStart = p2;
    bottomEnd = p3;
  }

  if (p4 != null) {
    topStart = p1;
    topEnd = p2!;
    bottomStart = p3!;
    bottomEnd = p4;
  }

  return builder(
    BorderRadiusGeometryDto(
      topStart: Radius.circular(topStart),
      topEnd: Radius.circular(topEnd),
      bottomStart: Radius.circular(bottomStart),
      bottomEnd: Radius.circular(bottomEnd),
    ),
  );
}