style(nav): 对齐四 Tab 底栏布局规格

This commit is contained in:
Zhou Weidong committed 2026-10-22 16:38:14 +08:00
1 parent 667fdc5f0a
commit 81787dc3aa
10 files changed
+103 -106

No files matched your search

+5 -15
View File
@@ -12,7 +12,6 @@ import '../../core/data/services/wallet_controller.dart';
import '../../core/theme/app_colors.dart';
import '../../core/theme/app_dimens.dart';
import '../../core/theme/app_theme.dart';
import '../../core/widgets/app_bottom_nav.dart';
import '../../core/widgets/app_root_tab.dart';
import '../../core/widgets/auth_gate.dart';
import '../../core/widgets/plain_page_scaffold.dart';
@@ -87,7 +86,7 @@ class _MyPageState extends State<MyPage> {
children: [
_topBar(l10n),
Expanded(child: _body(context, l10n)),
if (!embedded) _bottomNav(l10n),
if (!embedded) _bottomNav(),
],
),
);
@@ -238,19 +237,10 @@ class _MyPageState extends State<MyPage> {
_openProtected(RechargePage(onPurchased: () => unawaited(wallet.load())));
}
Widget _bottomNav(AppLocalizations l10n) {
return AppBottomNav(
items: [
for (final tab in AppRootTab.values)
AppBottomNavItem(
tabKey: tab.tabKey,
icon: tab.icon,
selectedIcon: tab.selectedIcon,
label: tab.label(l10n),
selected: tab == AppRootTab.mine,
onTap: tab == AppRootTab.mine ? () {} : () => _act(_actionOf(tab)),
),
],
Widget _bottomNav() {
return AppRootBottomNav(
selected: AppRootTab.mine,
onSelected: (tab) => _act(_actionOf(tab)),
);
}