CssRotation constructor Null safety

CssRotation(
  1. dynamic angleValue_OR_x,
  2. [num? y,
  3. num? z,
  4. CssNumericValue? angle]
)

Implementation

factory CssRotation(angleValue_OR_x,
    [num? y, num? z, CssNumericValue? angle]) {
  if ((angleValue_OR_x is CssNumericValue) &&
      y == null &&
      z == null &&
      angle == null) {
    return CssRotation._create_1(angleValue_OR_x);
  }
  if ((angle is CssNumericValue) &&
      (z is num) &&
      (y is num) &&
      (angleValue_OR_x is num)) {
    return CssRotation._create_2(angleValue_OR_x, y, z, angle);
  }
  throw new ArgumentError("Incorrect number or type of arguments");
}