printMessage function
Global console output utilities with loading animation support.
This module provides enhanced console output functions that integrate with a loading animation system. The loading animation is automatically disabled in CI/CD environments to avoid cluttering logs. Print a message to stdout with loading animation integration.
This function temporarily pauses any active loading animation, prints the message, and then resumes the animation. The message is also logged to the log file.
Parameters:
message: The message to print (null is converted to string)
Example:
printMessage('Processing files...');
printMessage('Found ${fileCount} files');
Implementation
/// Print a message to stdout with loading animation integration.
///
/// This function temporarily pauses any active loading animation,
/// prints the message, and then resumes the animation. The message
/// is also logged to the log file.
///
/// Parameters:
/// - [message]: The message to print (null is converted to string)
///
/// Example:
/// ```dart
/// printMessage('Processing files...');
/// printMessage('Found ${fileCount} files');
/// ```
void printMessage(String? message) {
Loading().printMessage(message);
}