Skip to content

Talker ignores pen color in logCustom, when the key is set. #381

@HE-LU

Description

@HE-LU

Describe the bug

Reopening issue: #313

As of a version 4.8.3 this is still not working. I am adding full testable code + output screenshot.

  final talker = TalkerFlutter.init();

  talker.logCustom(
    TalkerLog(
      'WITH A KEY',
      pen: AnsiPen()..xterm(46),
      key: TalkerLogType.debug.key,
    ),
  );

  talker.logCustom(
    TalkerLog(
      'WITHOUT A KEY',
      pen: AnsiPen()..xterm(46),
    ),
  );

Image

I did not go any deeper into the code. Just quickly checked the merged PR(fbe77e0) that should have fix the issue. This one seems maybe a bit of:

Image

This implies to me, at first glance, that the settings.getPenByLogKey(logTypeKey gets still the pen color by logType key in priority of the setted pen color.

Expected behavior
The color should be changed appropriately.

Desktop (please complete the following information):

  • OS: Linux Mint

Smartphone (please complete the following information):

  • Device: Samsung S22 Ultra
  • OS: Android 14

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinghelp wantedExtra attention is neededwork_in_progressСurrently under work

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions