fix:按html的假数据demo
This commit is contained in:
@@ -4,8 +4,8 @@ import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
|
||||
import '../routing/app_routes.dart';
|
||||
import '../data/providers.dart';
|
||||
import '../theme/app_icons.dart';
|
||||
import '../theme/wise_tokens.dart';
|
||||
import '../widgets/bottom_tab_bar.dart';
|
||||
import '../widgets/mini_player.dart';
|
||||
|
||||
class ShellPage extends ConsumerWidget {
|
||||
@@ -39,7 +39,7 @@ class ShellPage extends ConsumerWidget {
|
||||
),
|
||||
),
|
||||
body: ColoredBox(
|
||||
color: WiseColors.canvas,
|
||||
color: Theme.of(context).scaffoldBackgroundColor,
|
||||
child: Stack(children: [Positioned.fill(child: child)]),
|
||||
),
|
||||
bottomNavigationBar: SafeArea(
|
||||
@@ -48,54 +48,10 @@ class ShellPage extends ConsumerWidget {
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
MiniPlayer(player: player, onToggle: controller.toggleAudio),
|
||||
Container(
|
||||
height: 64,
|
||||
padding: const EdgeInsets.fromLTRB(12, 8, 12, 8),
|
||||
decoration: const BoxDecoration(
|
||||
color: WiseColors.canvas,
|
||||
border: Border(
|
||||
top: BorderSide(color: Color(0x11000000), width: 0.5),
|
||||
),
|
||||
),
|
||||
child: Row(
|
||||
children: List.generate(_tabs.length, (index) {
|
||||
final tab = _tabs[index];
|
||||
final active = index == safeIndex;
|
||||
return Expanded(
|
||||
child: InkWell(
|
||||
onTap: () => context.go(tab.path),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Icon(
|
||||
tab.icon,
|
||||
size: 20,
|
||||
color: active
|
||||
? WiseColors.ink
|
||||
: WiseColors.textTertiary,
|
||||
),
|
||||
const SizedBox(height: 4),
|
||||
Text(
|
||||
tab.label,
|
||||
style:
|
||||
(Theme.of(context).textTheme.labelLarge ??
|
||||
const TextStyle())
|
||||
.copyWith(
|
||||
color: active
|
||||
? WiseColors.ink
|
||||
: WiseColors.textTertiary,
|
||||
fontFamily: 'Inter',
|
||||
fontSize: 12,
|
||||
letterSpacing: 0.72,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}),
|
||||
),
|
||||
BottomTabBar(
|
||||
items: yantingBottomTabItems,
|
||||
selectedIndex: safeIndex,
|
||||
onSelected: (index) => context.go(_tabs[index].path),
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -105,17 +61,15 @@ class ShellPage extends ConsumerWidget {
|
||||
}
|
||||
|
||||
class _TabItem {
|
||||
const _TabItem({required this.label, required this.path, required this.icon});
|
||||
const _TabItem({required this.path});
|
||||
|
||||
final String label;
|
||||
final String path;
|
||||
final IconData icon;
|
||||
}
|
||||
|
||||
const List<_TabItem> _tabs = [
|
||||
_TabItem(label: '推荐', path: AppRoutes.home, icon: AppIcons.sparkle),
|
||||
_TabItem(label: '研报', path: AppRoutes.reports, icon: AppIcons.article),
|
||||
_TabItem(label: '机构', path: AppRoutes.institutions, icon: AppIcons.bank),
|
||||
_TabItem(label: '听单', path: AppRoutes.listen, icon: AppIcons.headphones),
|
||||
_TabItem(label: '我的', path: AppRoutes.profile, icon: AppIcons.user),
|
||||
_TabItem(path: AppRoutes.home),
|
||||
_TabItem(path: AppRoutes.reports),
|
||||
_TabItem(path: AppRoutes.institutions),
|
||||
_TabItem(path: AppRoutes.listen),
|
||||
_TabItem(path: AppRoutes.profile),
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user