refactor(flutter_core): 完全移除 GeneralCallback 模式#155
Merged
Conversation
Remove the deprecated GeneralCallback class and its associated callback directory. Move GeneralResponseCallback typedef to media_util.dart where it is still in use. Add dio re-export to barrel file to preserve downstream compatibility. Closes #149
|
Failed to generate code suggestions for PR |
Contributor
There was a problem hiding this comment.
Code Review
This pull request removes the deprecated GeneralCallback class and its associated source file, cleans up legacy commented-out code in home_page.dart, and updates package exports to include dio. In media_util.dart, a new typedef was introduced to replace the one from the deleted file; however, it is recommended to use a more explicit function type syntax to improve type safety and clarity.
|
Visit the preview URL for this PR (updated for commit 2cfc517): https://ap-common--example-preview-z8c3pggl.web.app (expires Mon, 06 Apr 2026 17:28:50 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 61ecbaa5d4e2786c745a5e21d2a66c533b7f072b |
… sealed class Introduce SaveImageResult sealed class (SaveImageSuccess/SaveImageError) to replace callback-based error handling in MediaUtil.saveImage. Remove BuildContext dependency from MediaUtil, moving UI concerns to callers.
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
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.
摘要
GeneralCallback類別及callback/目錄GeneralResponseCallbacktypedef 移至media_util.dartdio匯出,維持下游套件相容性測試計畫
melos run analyze— 9 個套件全數通過melos run test— 38 個測試全數通過Closes #149