defaultLogWriterCallback function

void defaultLogWriterCallback(
  1. String value, {
  2. bool isError = false,
})

The default logger function used by Refreshed for writing logs.

It takes a value parameter representing the log text and an optional isError parameter indicating whether the log is an error message. By default, if isError is not provided, it is assumed to be false. If isError is true or if logging is enabled (as determined by Get.isLogEnable), the log message is written using the developer log provided by the framework.

Implementation

void defaultLogWriterCallback(String value, {bool isError = false}) {
  if (isError || Get.isLogEnable) {
    developer.log(value, name: "Refreshed");
  }
}