支持国际化,修改国际化两个单词和两个汉字时,字体大小不一致 - #55
Open
xyhuangjia wants to merge 7 commits into
Open
Conversation
- 添加国际化设计文档 - 实现选择器国际化支持 - 添加 SafeArea 安全区设置
- address_picker_route.dart: 将 _init() 移到 didChangeDependencies() 中 - date_picker_route.dart: 将 Suffix.fromContext 和 _init() 移到 didChangeDependencies() 中 - 添加 _isInitialized 标志防止重复初始化
- 所有 picker 的 itemBuilder 中添加 Semantics widget 包裹 - locations_data.dart: getTowns 返回有意义的占位文本而非空字符串 - 避免 'value' 和 'increasedValue' 不匹配导致的 SemanticsNode assertion error
SinglePickerRoute 创建 AnimationController 使用 OverlayState 作为 TickerProvider, 但缺少 dispose 方法来清理它。当 Overlay 被销毁时,Ticker 仍活跃导致泄漏。 添加 dispose 方法确保 AnimationController 正确释放。 Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- 将级联选择、日期选择、路由弹窗、样式解析等共享逻辑抽取到 lib/src/ - 大幅简化各 Route 文件(AddressPickerRoute, DatePickerRoute, SinglePickerRoute 等) - 新增 8 个单元测试覆盖核心逻辑 - 新增项目文档(docs/agents/)与代码规范配置 - 删除旧的 flutter_picker_test.dart
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.
修复内容
问题描述:
在 initState() 中调用 AppLocalizations.of(context) 等 inherited widget 依赖方法,触发 Flutter assertion error:
dependOnInheritedWidgetOfExactType was called before _PickerState.initState() completed
影响范围:
修复方案:
修改文件:
问题描述:
CupertinoPicker 在处理空文本或未标注语义信息时,触发 SemanticsNode assertion error:
A SemanticsNode with action "increase" needs to be annotated with either both "value" and "increasedValue" or neither
影响范围:
修复方案:
修改文件:
3、选择器国际化支持 & SafeArea 安全区设置