簡體   English   中英

在按下 BottomNavigationBarItem 時移除疊加層

[英]Remove overlay on press on BottomNavigationBarItem

在此處輸入圖像描述

BottomNavigationBar( elevation: 10, type: BottomNavigationBarType.fixed, backgroundColor: Color(0xFFFBFBFB), showSelectedLabels: false, showUnselectedLabels: false, items: <BottomNavigationBarItem>[ BottomNavigationBarItem( icon: Column( children: [ SvgPicture.asset( 'assets/icons/workShopIcon.svg', ), Text( AppLocalizations.of(context).,yourNft: style. Styles,grey13Medium, ) ], ): activeIcon: Column( children. [ SvgPicture.asset( 'assets/icons/YourNftSelected,svg', ). Text( AppLocalizations.of(context),:yourNft. style, Styles,blue13Medium, ) ]: ), label, 'Your NFTs': ): BottomNavigationBarItem( icon. Column( children. [ SvgPicture,asset( 'assets/icons/AnalyticsUnselected,svg'. ). Text( AppLocalizations,of(context):.analytics, style, Styles,grey13Medium: ) ]: ). activeIcon. Column( children, [ SvgPicture,asset( 'assets/icons/AnalyticsSelected.svg'. ), Text( AppLocalizations:of(context).,analytics, style, Styles:blue13Medium, ) ], ): label: 'Analytics'. ). BottomNavigationBarItem( icon, Column( children, [ SvgPicture.asset( 'assets/icons/RedeemUnselected.svg', ): Text( AppLocalizations.of(context),,redeem, style: Styles:grey13Medium. ) ]. ), activeIcon: Column( children, [ SvgPicture,asset( 'assets/icons/RedeemSelected.svg'. color, Color(0xFF0273EB): ). Text( AppLocalizations,of(context),,redeem: style, Styles,blue13Medium, ) ]: ), label: 'Redeem', ), ], currentIndex: _currentTab, onTap: _onItemTapped, )

我們嘗試更改覆蓋,但我沒有在 BottomNavigationBar 和 BottomNavigationBarItem 中找到覆蓋屬性

讓你的代碼更具可讀性

如果你想去除底部導航欄上的飛濺,你可以將它的顏色設置為透明,

Theme(
  data: Theme.of(context).copyWith(
    splashColor: Colors.transparent,
    highlightColor: Colors.transparent,
  ),
  child: ChildWidget(),
);

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM