warn static method

void warn(
  1. Object? object, {
  2. LoggerOptions? options,
})

Implementation

static void warn(Object? object, {LoggerOptions? options}) {
  final location = _getLocation();
  LoggingRegistry().useLogging(LogLevel.warn, object);
  if (options?.isDebug == true) {
    debugPrint(
        "${DateTime.now().toIso8601String()} ${chalk.yellow("Warning: $object")} ${chalk.grey('Location: $location')}");
    return;
  }
  developer.log(
      "${DateTime.now().toIso8601String()} ${chalk.yellow("Warning: $object")} ${chalk.grey('Location: $location')}");
}