Math constructor

Math()

Factory constructor to ensure exception. Throws an exception if an attempt is made to instantiate this class.

Implementation

factory Math() {
  throw UnsupportedError(
    "Cannot instantiate Math. Use only static methods.",
  );
}