我尝试过的东西:
splashColorhighlightColorhoverColorhintColorColors.transparent尽管这似乎消除了最初的“轰动”,但“涟漪”效应仍然普遍存在(特别是onLongPress)。
Theme(
data : ThemeData(
splashColor: Colors.transparent,
highlightColor: Colors.transparent
),
child: NavigationRail(
selectedIndex: _selectedIndex,
onDestinationSelected: (int index) {
setState(() {
_selectedIndex = index;
});
},
labelType: NavigationRailLabelType.selected,
destinations: [
NavigationRailDestination(
icon: Icon(Icons.favorite_border),
selectedIcon: Icon(Icons.favorite),
label: Text('First'),
),
NavigationRailDestination(
icon: Icon(Icons.bookmark_border),
selectedIcon: Icon(Icons.book),
label: Text('Second'),
),
NavigationRailDestination(
icon: Icon(Icons.star_border),
selectedIcon: Icon(Icons.star),
label: Text('Third'),
),
],
),
)
Run Code Online (Sandbox Code Playgroud)
excludeSemanticstruePS:我不想覆盖 …
flutter ×1