简体   繁体   中英

Remove overlay on press on BottomNavigationBarItem

enter image description here

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, )

we try to change in overlay but I didn't find overlay property in BottomNavigationBar and BottomNavigationBarItem

Make your code more readable

If you want to remove splash on bottom Nav bar, you can set it's color to transparent,

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM