operator * method

IconToo operator *(
  1. dynamic operation
)

❌ "Multiply" this IconToo Randomly

IconToo operator *(dynamic operation)

Returns this IconToo if operation does not match a case described below.

operator *(dynamic operation)

  • operation is Colorcolor = operation
  • operation is numsizeX *= operation & sizeY *= operation
  • operation is List<num> (length==2) ➡ sizeX *= operation[0] & sizeY *= operation[1]

Implementation

IconToo operator *(dynamic operation) => (operation is Color)
    ? copyWith(color: operation)
    : (operation is num)
        ? copyWith(
            sizeX: (sizeX ?? 0.0) * operation,
            sizeY: (sizeY ?? 0.0) * operation)
        : (operation is List<num>)
            ? (operation.length == 2)
                ? copyWith(
                    sizeX: (sizeX ?? 0.0) * operation[0],
                    sizeY: (sizeY ?? 0.0) * operation[1],
                  )
                : this
            : this;