-
-
Couldn't load subscription status.
- Fork 101
New simplified TalkerKeys API (String Log key) #380
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Reviewer's GuideThis PR replaces the enum-based TalkerLogType API with a simpler TalkerKey static string constants, updates the settings and core Talker logic to use the new key-based methods, and refactors all related UI components, log classes, tests, and examples accordingly. Sequence Diagram: Interaction in
|
| Change | Details | Files |
|---|---|---|
| Introduce TalkerKey class and remove TalkerLogType enum |
|
packages/talker/lib/src/talker_key.dart |
| Update settings API to key-based lookups |
|
packages/talker/lib/src/settings.dart |
| Adapt Talker core to use new key API |
|
packages/talker/lib/src/talker.dart |
| Refactor Flutter UI components to key-based theming |
|
packages/talker_flutter/lib/src/ui/theme/talker_screen_theme.dartpackages/talker_flutter/lib/src/ui/widgets/data_card.dartpackages/talker_flutter/lib/src/ui/talker_monitor/talker_monitor.dartpackages/talker_flutter/lib/src/extensions/talker_data.dart |
| Update log classes in bloc, dio, http, riverpod to use TalkerKey |
|
packages/talker_bloc_logger/lib/bloc_logs.dartpackages/talker_riverpod_logger/lib/riverpod_logs.dartpackages/talker_dio_logger/lib/dio_logs.dartpackages/talker_http_logger/lib/talker_http_logger.dart |
| Refactor tests and examples to use TalkerKey |
|
packages/talker/test/talker_key.dartpackages/talker/test/talker_settings_test.dartpackages/talker_riverpod_logger/test/logs_test.dartpackages/talker_bloc_logger/test/logs_test.dartexamples/shop_app_example/lib/main.dart |
Tips and commands
Interacting with Sourcery
- Trigger a new review: Comment
@sourcery-ai reviewon the pull request. - Continue discussions: Reply directly to Sourcery's review comments.
- Generate a GitHub issue from a review comment: Ask Sourcery to create an
issue from a review comment by replying to it. You can also reply to a
review comment with@sourcery-ai issueto create an issue from it. - Generate a pull request title: Write
@sourcery-aianywhere in the pull
request title to generate a title at any time. You can also comment
@sourcery-ai titleon the pull request to (re-)generate the title at any time. - Generate a pull request summary: Write
@sourcery-ai summaryanywhere in
the pull request body to generate a PR summary at any time exactly where you
want it. You can also comment@sourcery-ai summaryon the pull request to
(re-)generate the summary at any time. - Generate reviewer's guide: Comment
@sourcery-ai guideon the pull
request to (re-)generate the reviewer's guide at any time. - Resolve all Sourcery comments: Comment
@sourcery-ai resolveon the
pull request to resolve all Sourcery comments. Useful if you've already
addressed all the comments and don't want to see them anymore. - Dismiss all Sourcery reviews: Comment
@sourcery-ai dismisson the pull
request to dismiss all existing Sourcery reviews. Especially useful if you
want to start fresh with a new review - don't forget to comment
@sourcery-ai reviewto trigger a new review!
Customizing Your Experience
Access your dashboard to:
- Enable or disable review features such as the Sourcery-generated pull request
summary, the reviewer's guide, and others. - Change the review language.
- Add, remove or edit custom review instructions.
- Adjust other review settings.
Getting Help
- Contact our support team for questions or feedback.
- Visit our documentation for detailed guides and information.
- Keep in touch with the Sourcery team by following us on X/Twitter, LinkedIn or GitHub.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary by Sourcery
Simplify the Talker API by replacing the enum-based log keys with a unified
TalkerKeystring API and updating all key lookups, settings methods, UI theming, and tests to use the new string-based keys.Enhancements:
TalkerLogTypeenum with a staticTalkerKeyclass of string constants for log keysfromKeyon the enum withTalkerKey.fromLogLevelreturning a stringgetTitleByKeyandgetPenByKeyand update all usages accordinglyTalkerKeyinstead ofTalkerLogType.x.key