【问题标题】:Showcaseview package highlighting CupertinoTabScaffold (used as BottomNavBar) [Flutter]Showcaseview 包突出显示 CupertinoTabScaffold(用作 BottomNavBar)[Flutter]
【发布时间】:2021-05-05 07:08:34
【问题描述】:

我正在使用showCaseView 包,当我突出显示小部件时,cupertinoTabScaffold 也会突出显示。 ShowCaseWidget 包装 MaterialApp 小部件,因此 TabScaffold 和所有其他由 ShowCase 包包装的小部件。有没有人遇到过这种情况,如何解决这个问题?

【问题讨论】:

    标签: flutter dart flutter-dependencies showcaseview


    【解决方案1】:

    我根据“showCaseView”现在是否处于活动状态更改了 CupertinoTabScaffold 的颜色:

      tabBar: CustomCupertinoTabBar(
          backgroundColor:
              Provider.of<NotifyShowcaseState>(context).isShowcaseActive //I've created ChangeNotifier class for updating state
                  ? const Color(0x99BDBDBD) //dimmed grey if showCase is active
                  : null,  //default white color, if showCase is inActive
                ....
            ),
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2022-12-04
      • 2022-12-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多