fix;设置和深浅色

This commit is contained in:
jingyun
2026-06-05 17:54:46 +08:00
parent 33d04a5545
commit af865b13fb
24 changed files with 742 additions and 290 deletions
+21 -17
View File
@@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
import 'package:shadcn_ui/shadcn_ui.dart';
import '../theme/app_icons.dart';
import '../theme/yanting_text.dart';
@@ -30,24 +31,28 @@ class BottomTabBar extends StatelessWidget {
@override
Widget build(BuildContext context) {
final colors = ShadTheme.of(context).colorScheme;
return DecoratedBox(
decoration: const BoxDecoration(
color: YantingColors.background,
border: Border(top: BorderSide(color: YantingColors.border)),
),
decoration: const BoxDecoration(color: Colors.transparent),
child: SizedBox(
height: YantingSpacing.tabBarHeight,
child: Row(
children: [
for (var index = 0; index < items.length; index++)
Expanded(
child: _BottomTabButton(
item: items[index],
selected: index == selectedIndex,
onTap: () => onSelected(index),
child: DecoratedBox(
decoration: BoxDecoration(
color: colors.background,
border: Border(top: BorderSide(color: colors.border)),
),
child: Row(
children: [
for (var index = 0; index < items.length; index++)
Expanded(
child: _BottomTabButton(
item: items[index],
selected: index == selectedIndex,
onTap: () => onSelected(index),
),
),
),
],
],
),
),
),
);
@@ -67,9 +72,8 @@ class _BottomTabButton extends StatelessWidget {
@override
Widget build(BuildContext context) {
final color = selected
? YantingColors.foreground
: YantingColors.mutedForeground;
final colors = ShadTheme.of(context).colorScheme;
final color = selected ? colors.foreground : colors.mutedForeground;
return InkWell(
onTap: onTap,
child: Column(