Skip to content

Commit 6a77df0

Browse files
authored
fix #4969
1 parent 02f0f88 commit 6a77df0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Reports/2025/#332-2025.04.21.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@
4444

4545
[@david-clang](https://github.com/david-clang):作者在调用 extension 拓展 BuildContext 的 context.l10n 时报运行时错误 `NoSuchMethodError`,最终通过 [ast_to_text.dart](https://github.com/dart-lang/sdk/blob/ee32a22712b64006b98a3923ff77f4d9476e2f84/pkg/kernel/lib/text/ast_to_text.dart#L5) 相关工具将 IR 层的 dill 文件转成可读文本,定位到问题根本原因是未显式声明函数参数是 BuildContext 类型,导致编译时 context 被推断为 dynamic 类型,最终导致运行时 `NoSuchMethodError` 错误。文章里通过分析 Dart AST 来找到代码根本问题的思路值得我们学习。
4646

47+
### 🐎 [SwiftUI Keyboard Shortcut Scope](https://useyourloaf.com/blog/swiftui-keyboard-shortcut-scope/)
48+
[@Smallfly](https://github.com/iostalks):本文聚焦 SwiftUI 键盘快捷键的「跨视图生效」问题,当控件通过导航跳转离开屏幕时,其关联的快捷键仍被系统识别并响应,导致操作冲突。核心原因是系统按视图层级解析快捷键,而非视图可见性。解决方案是利用状态变量动态禁用父视图控件,间接关闭其快捷键响应。若你在 SwiftUI 开发中需精准管理多层级导航的快捷键作用域,本文可帮助你快速定位逻辑隐患。
49+
4750
## 工具
4851

4952
> 开发过程中常用的工具,及一些新工具的介绍

0 commit comments

Comments
 (0)