printFunction static method

void printFunction(
  1. String prefix,
  2. dynamic 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(
  String prefix,
  dynamic value,
  String info, {
  bool isError = false,
}) {
  Get.log('$prefix $value $info'.trim(), isError: isError);
}