calculateSquareArea static method

double calculateSquareArea(
  1. double a, {
  2. double? b,
})

Calculate the area of a square or rectangle with length a and/or lengthb.

Implementation

static double calculateSquareArea(double a, {double? b}) {
  return b == null ? a * a : a * b;
}