fix:按照shadcn_ui对着demo_shadcn对齐

This commit is contained in:
jingyun
2026-06-05 15:04:39 +08:00
parent 9727b906c6
commit c5288f397d
29 changed files with 1425 additions and 642 deletions
+26 -13
View File
@@ -1,10 +1,11 @@
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:shadcn_ui/shadcn_ui.dart';
import '../routing/app_routes.dart';
import '../data/providers.dart';
import '../theme/wise_tokens.dart';
import '../routing/app_routes.dart';
import '../theme/yanting_text.dart';
import '../widgets/bottom_tab_bar.dart';
import '../widgets/mini_player.dart';
@@ -16,30 +17,42 @@ class ShellPage extends ConsumerWidget {
@override
Widget build(BuildContext context, WidgetRef ref) {
final theme = ShadTheme.of(context);
final player = ref.watch(audioPlayerControllerProvider);
final controller = ref.read(audioPlayerControllerProvider.notifier);
final canPop = GoRouter.of(context).canPop();
final selectedIndex = _tabs.indexWhere((tab) => tab.path == currentPath);
final safeIndex = selectedIndex < 0 ? 0 : selectedIndex;
return Scaffold(
backgroundColor: theme.colorScheme.background,
appBar: AppBar(
title: const Column(
backgroundColor: theme.colorScheme.background,
surfaceTintColor: Colors.transparent,
elevation: 0,
leading: canPop
? ShadIconButton.ghost(
onPressed: () => context.pop(),
icon: const Icon(LucideIcons.chevronLeft, size: 18),
)
: null,
title: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text('研听'),
Text(
'全球机构研报中文解读',
style: TextStyle(
fontSize: 12,
color: WiseColors.textSecondary,
fontWeight: FontWeight.w500,
),
),
Text('研听', style: YantingText.listTitle),
Text('全球机构研报中文解读', style: YantingText.meta.copyWith(fontSize: 12)),
],
),
bottom: PreferredSize(
preferredSize: const Size.fromHeight(1),
child: ColoredBox(
color: theme.colorScheme.border,
child: const SizedBox(height: 1, width: double.infinity),
),
),
),
body: ColoredBox(
color: Theme.of(context).scaffoldBackgroundColor,
color: theme.colorScheme.background,
child: Stack(children: [Positioned.fill(child: child)]),
),
bottomNavigationBar: SafeArea(