File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change 44
44
45
45
[ @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 来找到代码根本问题的思路值得我们学习。
46
46
47
+ ### 🐎 [ SwiftUI Keyboard Shortcut Scope] ( https://useyourloaf.com/blog/swiftui-keyboard-shortcut-scope/ )
48
+ [ @Smallfly ] ( https://github.com/iostalks ) :本文聚焦 SwiftUI 键盘快捷键的「跨视图生效」问题,当控件通过导航跳转离开屏幕时,其关联的快捷键仍被系统识别并响应,导致操作冲突。核心原因是系统按视图层级解析快捷键,而非视图可见性。解决方案是利用状态变量动态禁用父视图控件,间接关闭其快捷键响应。若你在 SwiftUI 开发中需精准管理多层级导航的快捷键作用域,本文可帮助你快速定位逻辑隐患。
49
+
47
50
## 工具
48
51
49
52
> 开发过程中常用的工具,及一些新工具的介绍
You can’t perform that action at this time.
0 commit comments