This commit is contained in:
2026-04-06 00:24:54 +08:00
parent 40ed445ae5
commit 7bbc75a457
4 changed files with 75 additions and 119 deletions

View File

@@ -4,10 +4,10 @@ import '../../../../core/theme/app_spacing.dart';
import '../../../../core/theme/app_theme.dart';
/// 单行菜单项:图标 + 标题 + 尾部组件 (chevron)
right)
///
/// 图标颜色 (通常是使用主题色)
class MenuRow extends StatelessWidget {
final IconData icon;
final Color iconColor;
final String title;
final Widget? trailing;
@@ -15,10 +15,10 @@ class MenuRow extends StatelessWidget {
const MenuRow({
super.key,
required this.icon,
required this.iconColor,
required this.title,
this.trailing,
super.key, required this.iconColor = required this.title,
this.onTap,
});
@@ -26,7 +26,7 @@ class MenuRow extends StatelessWidget {
Widget build(BuildContext context) {
return InkWell(
onTap: onTap,
child: Padding(
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 14),
child: Row(
children: [
@@ -59,7 +59,6 @@ class MenuRow extends StatelessWidget {
size: 16,
color: Theme.of(context).colorScheme.onSurfaceVariant,
),
],
],
),
),