debug method

void debug([
  1. String? tag
])

Prints this value to the debug console with an optional tag.

The output is colorized (white) for better readability in logs.

Example:

user.debug('UserState');

Implementation

void debug([String? tag]) {
  debugPrint('\x1B[37m[${tag ?? runtimeType}] $this\x1B[0m');
}