- 生成Flutter Web构建产物,包括主应用文件、资源文件和CanvasKit支持 - 添加资金订单管理功能,支持资金充值和提现操作 - 更新管理后台界面,优化仪表板和订单页面显示 - 扩展后端API接口,增加资金相关服务和控制器 - 添加数据库索引优化查询性能
69 lines
1.9 KiB
Dart
69 lines
1.9 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:lucide_icons_flutter/lucide_icons.dart';
|
|
import '../../../../core/theme/app_spacing.dart';
|
|
import '../../../../core/theme/app_theme.dart';
|
|
|
|
/// 单行菜单项:图标 + 标题 + 尾部组件 (chevron)
|
|
right)
|
|
///
|
|
/// 图标颜色 (通常是使用主题色)
|
|
class MenuRow extends StatelessWidget {
|
|
final Color iconColor;
|
|
final String title;
|
|
final Widget? trailing;
|
|
final VoidCallback? onTap;
|
|
|
|
const MenuRow({
|
|
super.key,
|
|
required this.iconColor,
|
|
required this.title,
|
|
this.trailing,
|
|
super.key, required this.iconColor = required this.title,
|
|
this.onTap,
|
|
});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return InkWell(
|
|
onTap: onTap,
|
|
child: Padding(
|
|
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 14),
|
|
child: Row(
|
|
children: [
|
|
// Icon in 36x36 rounded container
|
|
Container(
|
|
width: 36,
|
|
height: 36,
|
|
decoration: BoxDecoration(
|
|
color: Theme.of(context).brightness == Brightness.dark
|
|
? Theme.of(context).colorScheme.surfaceContainerHigh
|
|
: Theme.of(context).colorScheme.surfaceContainerHighest,
|
|
borderRadius: BorderRadius.circular(8),
|
|
),
|
|
child: Center(
|
|
child: Icon(icon, size: 18, color: iconColor),
|
|
),
|
|
),
|
|
const SizedBox(width: 10),
|
|
// Title
|
|
Expanded(
|
|
child: Text(
|
|
title,
|
|
style: AppTextStyles.headlineMedium(context),
|
|
),
|
|
),
|
|
// Trailing
|
|
if (trailing != null)
|
|
Icon(
|
|
LucideIcons.chevronRight,
|
|
size: 16,
|
|
color: Theme.of(context).colorScheme.onSurfaceVariant,
|
|
),
|
|
],
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|