import 'package:flutter/material.dart'; import 'package:go_router/go_router.dart'; /// 底部导航 Shell — 2 Tab(Home / Mine)。 /// Tab 标签文字在 Task 5 替换为 i18n 字符串。 class ShellScaffold extends StatelessWidget { const ShellScaffold({super.key, required this.shell}); final StatefulNavigationShell shell; @override Widget build(BuildContext context) { return Scaffold( body: shell, bottomNavigationBar: NavigationBar( selectedIndex: shell.currentIndex, onDestinationSelected: (index) => shell.goBranch( index, initialLocation: index == shell.currentIndex, ), destinations: const [ NavigationDestination( icon: Icon(Icons.home_outlined), selectedIcon: Icon(Icons.home), label: 'Home', // TODO: i18n → t.tab.home ), NavigationDestination( icon: Icon(Icons.person_outline), selectedIcon: Icon(Icons.person), label: 'Mine', // TODO: i18n → t.tab.mine ), ], ), ); } }