如何本地化 BottomNavigationBarItem 标签

How to localize BottomNavigationBarItem labels

是否有将 BottomNavigationBarItem 翻译成不同语言的解决方法? 我使用 Lang.getString(context, key) 访问地图(从 json 文件加载)以获取正确的翻译,像这样硬编码标签没有任何意义,标签: “家”。我该怎么办?

PageView(
        controller: pageController,
        onPageChanged: _pageSwipped,
        children: <Widget>[Page1()],
      ),
      bottomNavigationBar: BottomNavigationBar(
        items: const <BottomNavigationBarItem>[
          BottomNavigationBarItem(
            icon: Icon(Icons.list),
            label: Lang.getString(context, key), // it doesn't work because it should be constant.
          ),
        ],
        currentIndex: _currenIndex,
        selectedItemColor: Colors.blue,
        iconSize: _deviceSize.size.height * 0.046,
        selectedFontSize: _deviceSize.size.height * 0.023,
        unselectedItemColor: Colors.grey,
        onTap: _bottomTapped,
      )

从第

行删除 const 关键字
 items: const <BottomNavigationBarItem>[
 ......
 ......
 ]