feat: 诗词答题页面主题色支持与代码重构
- 创建 poetry-page.dart,提取 UI 组件(PoetryOptionItem、PoetryOptionsLayout、PoetryTag) - 修改 poetry.dart,使用新组件,添加主题色支持 - 修改 flow-anim.dart,添加主题色支持 - 修改 distinguish.dart,添加主题色支持 - 支持动态主题色切换 - 支持深色模式 - 保持页面布局不变
This commit is contained in:
@@ -4,6 +4,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
import '../../../services/get/theme_controller.dart';
|
||||
import '../../../models/colors/theme_colors.dart';
|
||||
|
||||
/// 流动边框装饰器
|
||||
class FlowingBorderDecoration extends Decoration {
|
||||
@@ -108,7 +109,10 @@ class _FlowingBorderContainerState extends State<FlowingBorderContainer>
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Obx(() {
|
||||
final color = widget.color ?? _themeController.currentThemeColor;
|
||||
final color =
|
||||
widget.color ??
|
||||
ThemeColors.getThemeColor(_themeController.themeColorIndexRx.value);
|
||||
|
||||
return AnimatedBuilder(
|
||||
animation: _animation,
|
||||
builder: (context, child) {
|
||||
|
||||
Reference in New Issue
Block a user