Skip to content

refactor(flutter_core): 完全移除 GeneralCallback 模式#155

Merged
abc873693 merged 2 commits intomasterfrom
refactor/149-remove-general-callback
Mar 31, 2026
Merged

refactor(flutter_core): 完全移除 GeneralCallback 模式#155
abc873693 merged 2 commits intomasterfrom
refactor/149-remove-general-callback

Conversation

@abc873693
Copy link
Copy Markdown
Owner

摘要

  • 刪除已棄用的 GeneralCallback 類別及 callback/ 目錄
  • 將仍在使用的 GeneralResponseCallback typedef 移至 media_util.dart
  • 在 barrel file 補上 dio 匯出,維持下游套件相容性
  • 清除 example app 中已註解的舊 callback 程式碼

測試計畫

  • melos run analyze — 9 個套件全數通過
  • melos run test — 38 個測試全數通過

Closes #149

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
@github-actions
Copy link
Copy Markdown

Failed to generate code suggestions for PR

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread packages/ap_common_flutter_core/lib/src/utilities/media_util.dart Outdated
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 30, 2026

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.
@abc873693 abc873693 merged commit 5c8e194 into master Mar 31, 2026
3 checks passed
@abc873693 abc873693 deleted the refactor/149-remove-general-callback branch March 31, 2026 10:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor: 完全移除 GeneralCallback 模式

1 participant