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

Include provider.name in the output of `TalkerRiverpodObserver` #233

Closed KoheiKanagu closed 3 months ago

KoheiKanagu commented 3 months ago

Is your feature request related to a problem? Please describe. It would be useful to output the name in TalkerRiverpodObserver to identify which Provider the log is for.

Describe the solution you'd like Currently, you can see the runtimeType as follows, but you cannot identify the name, so you cannot identify the Provider.

I think it would be good to change it to output the name when provider.name is not null.

https://github.com/rrousselGit/riverpod/blob/master/packages/riverpod/lib/src/framework/foundation.dart#L21

[Talker] ┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────
         │ [riverpod-update] | 21:30:11 662ms |
         │ AutoDisposeFutureProvider<bool> updated
         │ PREVIOUS state:
         │ AsyncLoading<bool>()
         │ NEW state:
         │ AsyncData<bool>(value: false)
         └──────────────────────────────────────────────────────────────────────────────────────────────────────────────
Frezyx commented 3 months ago

Hello @KoheiKanagu 🤝 Thank you for this issue! I agree that this would be a good change.

Can you create a pull request with this functionality?

KoheiKanagu commented 3 months ago

Ok, I'll try. 👍

KoheiKanagu commented 3 months ago

@Frezyx Could you check #238?