colors property
Custom Logger Colors.
The colors field is designed for setting custom text colors for the logger, associated with specific log keys.
Each color is associated with a specific log key represented as an enum called TalkerKey. This allows you to
define custom text colors for each log key, enhancing the visual representation of logs in the console.
Example usage:
final customColors = {
TalkerKey.info.key: AnsiPen()..white(bold: true),
TalkerKey.error.key: AnsiPen()..red(bold: true),
TalkerKey.warning.key: AnsiPen()..yellow(bold: true),
};
final logger = Talker(
settings: TalkerSettings(
colors: customColors,
)
);
By using the colors field, you can customize the text colors for specific log keys in the console.
Implementation
final Map<String, AnsiPen> colors = _defaultColors;