fix:导航栏交互和UI

This commit is contained in:
jingyun
2026-06-05 16:05:32 +08:00
parent c5288f397d
commit 33d04a5545
10 changed files with 267 additions and 147 deletions
+18 -17
View File
@@ -1,5 +1,4 @@
import 'package:flutter/material.dart';
import 'package:shadcn_ui/shadcn_ui.dart';
import '../theme/yanting_tokens.dart';
@@ -21,29 +20,31 @@ class AppCard extends StatelessWidget {
@override
Widget build(BuildContext context) {
final theme = ShadTheme.of(context);
final radius = BorderRadius.circular(YantingRadius.xl);
final content = ShadCard(
padding: padding,
backgroundColor: color,
radius: radius,
border: ShadBorder.all(color: borderColor),
shadows: const [],
child: child,
final decoration = BoxDecoration(
color: color,
borderRadius: radius,
border: Border.all(color: borderColor),
);
if (onTap == null) return content;
if (onTap == null) {
return DecoratedBox(
decoration: decoration,
child: Padding(padding: padding, child: child),
);
}
return Material(
color: Colors.transparent,
borderRadius: radius,
child: InkWell(
borderRadius: radius,
splashColor: theme.colorScheme.mutedForeground.withValues(alpha: 0.08),
highlightColor: theme.colorScheme.mutedForeground.withValues(
alpha: 0.04,
child: Ink(
decoration: decoration,
child: InkWell(
borderRadius: radius,
splashColor: YantingColors.mutedForeground.withValues(alpha: 0.08),
highlightColor: YantingColors.mutedForeground.withValues(alpha: 0.04),
onTap: onTap,
child: Padding(padding: padding, child: child),
),
onTap: onTap,
child: content,
),
);
}