toInt method Null safety

int toInt()

Return an integer.

Implementation

int toInt() {
  switch (this) {
    case LogLevel.error:
      return SYZ_LOG_LEVEL.SYZ_LOG_LEVEL_ERROR;
    case LogLevel.warn:
      return SYZ_LOG_LEVEL.SYZ_LOG_LEVEL_WARN;
    case LogLevel.info:
      return SYZ_LOG_LEVEL.SYZ_LOG_LEVEL_INFO;
    case LogLevel.debug:
      return SYZ_LOG_LEVEL.SYZ_LOG_LEVEL_DEBUG;
  }
}