feat(ui): 重构资产页面UI,移除shadcn_ui依赖并简化设计 - 删除三个过时的功能规格文档(apply-new-styles.md、bottom-nav-labels.md、theme-dynamic-colors.md) - 重构充值页面(deposit_page.dart):移除shadcn_ui依赖,简化表单验证和UI设计,使用动态主题颜色 - 重构划转页面(transfer_page.dart):移除复杂动画和shadcn_ui依赖,简化UI布局和交互逻辑 - 重构提现页面(withdraw_page.dart):移除shadcn_ui依赖,简化表单验证和网络选择器 - 重构我的页面相关组件:统一使用动态主题颜色,简化菜单项设计和KYC状态显示 - 所有页面现在使用Theme.of(context)获取动态颜色,支持明暗主题切换 - 移除硬编码的颜色引用,提高代码可维护性和主题一致性
55 lines
1.4 KiB
Dart
55 lines
1.4 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:lucide_icons_flutter/lucide_icons.dart';
|
|
import '../../../../core/theme/app_theme.dart';
|
|
|
|
/// 单行菜单项:图标 + 标题 + 尾部
|
|
class MenuRow extends StatelessWidget {
|
|
final IconData icon;
|
|
final Color iconColor;
|
|
final String title;
|
|
final Widget? trailing;
|
|
final VoidCallback? onTap;
|
|
|
|
const MenuRow({
|
|
super.key,
|
|
required this.icon,
|
|
required this.iconColor,
|
|
required this.title,
|
|
this.trailing,
|
|
this.onTap,
|
|
});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final colorScheme = Theme.of(context).colorScheme;
|
|
|
|
return InkWell(
|
|
onTap: onTap,
|
|
child: Padding(
|
|
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 14),
|
|
child: Row(
|
|
children: [
|
|
Icon(icon, size: 18, color: iconColor),
|
|
const SizedBox(width: 10),
|
|
Expanded(
|
|
child: Text(
|
|
title,
|
|
style: AppTextStyles.bodyLarge(context).copyWith(
|
|
fontWeight: FontWeight.w500,
|
|
),
|
|
),
|
|
),
|
|
if (trailing != null) trailing!,
|
|
if (trailing == null)
|
|
Icon(
|
|
LucideIcons.chevronRight,
|
|
size: 16,
|
|
color: colorScheme.onSurfaceVariant,
|
|
),
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|