printFunction<T> static method

void printFunction<T>(
  1. String prefix,
  2. T value,
  3. String info, {
  4. bool isError = false,
})

Utility function for printing logs with a specified prefix and additional information.

This function logs the provided value along with the prefix and info. If isError is set to true, the log is marked as an error.

Example:

printFunction('DEBUG:', 'Something happened', 'Additional information');

This function delegates the logging to Get.log method from the Get package. Ensure that the Get package is imported and initialized properly for logging to work.

See also:

  • Get.log, the method used internally for logging.

Implementation

static void printFunction<T>(
  String prefix,
  T value,
  String info, {
  bool isError = false,
}) {
  Get.log("$prefix $value $info".trim(), isError: isError);
}