-
Notifications
You must be signed in to change notification settings - Fork 152
demo: 新增深色模式配置文档,优化深色模式示例,设置应用启动时禁止横屏 #768
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
runoob-coder
wants to merge
21
commits into
Tencent:develop
Choose a base branch
from
runoob-coder:develop
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
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
- 添加 WidgetsFlutterBinding.ensureInitialized() 确保 Flutter 绑定初始化 - 使用 SystemChrome.setPreferredOrientations 限制设备方向为竖屏
Contributor
📱 APK 下载 |
- 新增暗黑主题配置项,在defaultThemeConfig中添加dark主题定义 - 修改OnThemeChange回调函数签名,支持传递暗黑主题数据 - 更新主题切换逻辑,支持亮色和暗色主题数据分别设置 - 调整主页主题按钮布局和间距样式 - 修改应用主题模式为系统跟随模式(ThemeMode.system) - 优化主题数据加载逻辑,支持从assets/theme.json加载亮色和暗色主题
- 移除调试打印语句,提升代码整洁度 - 更新示例应用中的主题数据初始化逻辑 - 优化 AppBar 渐变背景的代码格式- 调整 BottomTabBar 配置代码的可读性- 统一图标和文本样式的代码风格 -修复部分 widget 嵌套结构以提高性能- 精简输入组件和按钮的配置参数 - 改进文本组件的字体加载方式- 优化整体示例页面的布局结构 - 增强主题切换功能的稳定性 - 完善多主题支持的初始化流程 - 提升代码可维护性和扩展性 - 规范组件使用示例的书写方式 - 优化资源加载和内存管理策略 - 改进错误处理和边界情况判断 - 增强组件间通信和状态管理机制
- 修改 timeUnitMap 方法以使用 widget.model.mapping作为键 - 更新默认 mapping 数组值为英文标识符 - 优化时间单位获取逻辑,增加空值处理 - 调整 weeksMap 数组定义格式,提升可读性
- 使用 PlatformDispatcher.instance.views.first 替代 window 获取屏幕信息 -保持设计稿750 宽度的适配比例不变 -修复可能因多窗口导致的屏幕信息不准确问题 - 提高代码健壮性和未来多窗口支持的兼容性
- 移除多余的空行 -优化join2函数参数格式 - 调整循环变量赋值格式 - 移除文件末尾多余空行
- 在主库文件中添加 td_form_validation 的导出 - 移除重复的导出声明以避免冲突 - 确保表单验证功能可被外部模块正确引用
- 优化 ExamplePageModel 构造函数参数格式,提升可读性- 调整 ExamplePageInheritedTheme 构造函数参数布局 - 简化 ScreenUtil 类中的屏幕判断方法 - 重构 home.dart 页面布局结构,将主体内容嵌套在 SafeArea 内- 移除_buildBody 方法,直接构建页面主体内容- 更新绿色和红色主题配置,扩展品牌色系定义 - 统一按钮间距样式,使用 EdgeInsets.symmetric 替代显式边距设置
- 引入 provider 和 shared_preferences 包管理主题状态 - 创建 ThemeModeProvider 管理主题模式的持久化与切换 - 在导航栏添加主题切换按钮(仅移动端显示) - 使用 MultiProvider 包装 MaterialApp 实现全局主题控制 - 修复代码格式问题,增强结构可读性
- 新增深色模式主题配置支持 - 实现主题模式切换界面 - 支持跟随系统主题自动切换 - 提供手动选择浅色/深色模式选项 - 集成TDesign主题数据加载与应用 - 使用Provider管理主题状态变化
- 在浅色和深色主题中添加 TD 自定义主题配置 - 更新主题模式初始化逻辑注释 - 移除通知监听者语言已改变的冗余注释 - 优化主题模式切换时的通知机制
- 新增深色模式配置与切换的详细说明 - 提供主题配置和应用的示例代码 - 介绍如何通过状态管理实现主题持久化 - 添加手动切换深色/浅色模式的实现方式 - 集成到网站导航中的全局配置部分 - 包含完整的代码片段和使用示例
- 在文档顶部插入版本提示框 - 提示用户该特性于0.2.6 版本上线 - 使用 SVG 图标增强视觉效果 - 设置背景色和圆角样式提升可读性
- 将单行注释 (//) 替换为文档注释 (///) - 统一代码注释风格以提高可读性 - 添加更多注释说明以增强代码理解 - 优化注释排版与格式一致性 - 补充对主题配置和颜色覆盖逻辑的解释 - 明确系统主题获取方式的相关注释
- 新增深色主题配置代码块 - 补充 brandColor 系列颜色定义 - 添加 warning、error、success 等状态色配置 - 完善背景色和文字颜色映射关系 - 提供完整的 darkTheme JSON 配置结构- 增加颜色引用说明注释 - 优化文档结构便于理解主题配置方式
- 将flutter_plugin_android_lifecycle从2.0.28更新至2.0.32- 保持web依赖版本不变- 更新依赖配置以确保兼容性
- 修改默认高度从 340 到 348 -仅在 draggable为 true 时添加动画监听器- 优化高度更新与动画同步逻辑 - 统一条件判断中的空格风格- 格式化代码以符合规范 - 提取部分表达式避免重复计算 - 修复部分组件命名和继承关系的排版问题
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.

🤔 这个 PR 的性质是?
🔗 相关 Issue
#784
💡 需求背景和解决方案
设置应用启动时禁止横屏
优化demo深色模式示例
添加主题切换功能并优化导航栏
优化更新文档,新增深色模式配置文档
fix(TDPopup): 修复底部弹出层UI一直重建绘制问题
[] 本条 PR 不需要纳入 Changelog
☑️ 请求合并前的自查清单
组件类名: 修改描述(示例:TDBottomTabBar: 修复iconText模式,底部溢出2.5像素)