Frezyx / talker

☎️ Advanced error handler and logger for dart and flutter apps
https://pub.dev/packages/talker
MIT License
478 stars 57 forks source link

talker_flutter: TalkerScreen doesn't display stack traces #213

Open wcoder opened 5 months ago

wcoder commented 5 months ago

Describe the bug The stack trace is not displayed when TalkerDataCard is expanded.

To Reproduce Steps to reproduce the behavior:

  1. _talker.error(any exception)
  2. open TalkerScreen

Expected behavior When the TalkerDataCard is expanded, stack trace should be displayed.

Screenshots If applicable, add screenshots to help explain your problem.

Env:

Investigation

The problem is here:

https://github.com/Frezyx/talker/blob/09e75c52ecf9b072982b135c1cd7582f13da5908/packages/talker_flutter/lib/src/ui/widgets/data_card.dart#L177-L180

The usual widget.data contains a TalkerLog object and is caught by this condition above and returns null.

Workaround

talker.error('$message\nex:$ex\nst:$stacktrace', ex, stacktrace);
Frezyx commented 5 months ago

Hello @wcoder ! This is really a bug. We need to fix this issue ⚙️