281a6261fb
- tablet_shell: 侧栏 232·4 项触控(minHeight 48, 字号 15) + 顶栏无主题切换 + 连接页双栏 对照 ui_kits/tablet/tabapp.jsx;home_shell 分发 tablet→TabletShell - nav_sidebar 加 dense 参数(desktop 紧凑 / tablet 触控) - content_top_bar 加 showThemeToggle + titleSize 参数 - tool/visual-diff.md: 截图 diff 工作流(design-distill 工具)+ 实现侧三路径 现状(golden 被 google_fonts 阻塞 / screencapture 受 macOS chrome 限制)+ 推荐 注: tablet 形态在 macOS 桌面平台不触发(只 desktop/mobile),运行验证需 iPad。 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
29 lines
1003 B
Dart
29 lines
1003 B
Dart
// home_shell.dart — 主框架分发器(按 formFactor 选三端外壳)
|
||
//
|
||
// desktop → 侧栏 6 项 + 顶栏(对照 ui_kits/desktop)
|
||
// tablet → 暂用 MobileShell(TODO: TabletShell 侧栏双栏,对照 ui_kits/tablet)
|
||
// mobile → 底 Tab + 滑动(对照 ui_kits/mobile)
|
||
import 'package:flutter/material.dart';
|
||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||
|
||
import '../core/responsive/form_factor.dart';
|
||
import '../pangolin_theme.dart';
|
||
import 'desktop_shell.dart';
|
||
import 'mobile_shell.dart';
|
||
import 'tablet_shell.dart';
|
||
|
||
class HomeShell extends ConsumerWidget {
|
||
const HomeShell({super.key});
|
||
|
||
@override
|
||
Widget build(BuildContext context, WidgetRef ref) {
|
||
final c = context.pangolin;
|
||
final Widget body = switch (context.formFactor) {
|
||
FormFactor.desktop => const DesktopShell(),
|
||
FormFactor.tablet => const TabletShell(),
|
||
FormFactor.mobile => const MobileShell(),
|
||
};
|
||
return Scaffold(backgroundColor: c.bg, body: body);
|
||
}
|
||
}
|