From 3b42b331d11e853c53fd488d9d600e747c9efb44 Mon Sep 17 00:00:00 2001 From: 21pages Date: Fri, 24 Mar 2023 17:39:31 +0800 Subject: [PATCH] fix home page tabbar label language cannot be changed Signed-off-by: 21pages --- flutter/lib/desktop/pages/desktop_tab_page.dart | 4 ++-- flutter/lib/desktop/widgets/tabbar_widget.dart | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/flutter/lib/desktop/pages/desktop_tab_page.dart b/flutter/lib/desktop/pages/desktop_tab_page.dart index 4a1a40242..a642e2590 100644 --- a/flutter/lib/desktop/pages/desktop_tab_page.dart +++ b/flutter/lib/desktop/pages/desktop_tab_page.dart @@ -23,7 +23,7 @@ class DesktopTabPage extends StatefulWidget { DesktopTabController tabController = Get.find(); tabController.add(TabInfo( key: kTabLabelSettingPage, - label: translate(kTabLabelSettingPage), + label: kTabLabelSettingPage, selectedIcon: Icons.build_sharp, unselectedIcon: Icons.build_outlined, page: DesktopSettingPage( @@ -46,7 +46,7 @@ class _DesktopTabPageState extends State { RemoteCountState.init(); tabController.add(TabInfo( key: kTabLabelHomePage, - label: translate(kTabLabelHomePage), + label: kTabLabelHomePage, selectedIcon: Icons.home_sharp, unselectedIcon: Icons.home_outlined, closable: false, diff --git a/flutter/lib/desktop/widgets/tabbar_widget.dart b/flutter/lib/desktop/widgets/tabbar_widget.dart index 4211911ff..2186e879e 100644 --- a/flutter/lib/desktop/widgets/tabbar_widget.dart +++ b/flutter/lib/desktop/widgets/tabbar_widget.dart @@ -869,7 +869,7 @@ class _TabState extends State<_Tab> with RestorationMixin { return ConstrainedBox( constraints: BoxConstraints(maxWidth: widget.maxLabelWidth ?? 200), child: Text( - widget.label.value, + translate(widget.label.value), textAlign: TextAlign.center, style: TextStyle( color: isSelected