I want to apply localization in bottom navigation bar. I have created seperate class as TabItem. I couldn't get how to access context in this class. I have used CupertinoTabScaffold. Below is my code.

enum TabItem {dashboard,  account ,language }

class TabItemData {

    const TabItemData({
        required this.key, required this.title, required this.icon

    final String key;
    final String title;
    final IconData icon;

    static  Map<TabItem, TabItemData> allTabs = {
        TabItem.dashboard: TabItemData(
            key: Keys.dashboardTab,
            title: Strings.dashboard,
            icon: Icons.home,

        TabItem.language: TabItemData(
            key: Keys.languageTab,
            title: Strings.language,
            icon: Icons.language,