final ButtonStyle noSplash = ButtonStyle(
overlayColor: WidgetStateProperty.all(
Colors.transparent,
),
splashFactory: NoSplash.splashFactory,
);
ThemeData(
// Disable global ripple/highlight
splashColor: Colors.transparent,
splashFactory: NoSplash.splashFactory,
highlightColor: Colors.transparent,
hoverColor: Colors.transparent,
focusColor: Colors.transparent,
// Disable each widget's own tap effect.
iconButtonTheme: IconButtonThemeData(
style: noSplash,
),
floatingActionButtonTheme: FloatingActionButtonThemeData(
splashColor: Colors.transparent,
),
textButtonTheme: TextButtonThemeData(
style: noSplash,
),
elevatedButtonTheme: ElevatedButtonThemeData(
style: noSplash,
),
outlinedButtonTheme: OutlinedButtonThemeData(
style: noSplash,
),
filledButtonTheme: FilledButtonThemeData(
style: noSplash,
),
navigationBarTheme: NavigationBarThemeData(
overlayColor: WidgetStateProperty.all(
Colors.transparent,
),
),
tabBarTheme: TabBarThemeData(
overlayColor: WidgetStateProperty.all(
Colors.transparent,
),
splashFactory: NoSplash.splashFactory,
),
checkboxTheme: CheckboxThemeData(
overlayColor: WidgetStateProperty.all(
Colors.transparent,
),
splashRadius: 0,
),
radioTheme: RadioThemeData(
overlayColor: WidgetStateProperty.all(
Colors.transparent,
),
splashRadius: 0,
),
switchTheme: SwitchThemeData(
overlayColor: WidgetStateProperty.all(
Colors.transparent,
),
),
sliderTheme: SliderThemeData(
overlayColor: Colors.transparent,
overlayShape: SliderComponentShape.noOverlay,
),
menuButtonTheme: MenuButtonThemeData(
style: noSplash,
),
segmentedButtonTheme: SegmentedButtonThemeData(
style: noSplash,
),
toggleButtonsTheme: ToggleButtonsThemeData(
splashColor: Colors.transparent,
highlightColor: Colors.transparent,
),
searchBarTheme: SearchBarThemeData(
overlayColor: WidgetStateProperty.all(
Colors.transparent,
),
),
)