interactionEffects property

bool interactionEffects
final

Opt-in on using color branded hover, focus, highlight and splash interaction state effects.

The standard colors on hover, focus, highlight and splash effects use greys, i.e. white or black with different opacity levels.

To get a color themed effect, set interactionEffects to true, and to false for the Flutter SDK Material 2 default ThemeData values.

These effects apply to all Widgets that get them from ThemeData.

The buttons ElevatedButton, OutlinedButton and TextButton define theme styles that by default use their own themed Material state effects for hover, focus, highlight and splash. These already include primary color blends and own different opacity values by default. The defaults on SDK overall ThemeData hover, focus, highlight and splash do not match this newer design, and they look out of place, especially in an otherwise primary color, alpha blended theme.

When you opt-in on interactionEffects it makes the overall hover, focus, highlight and splash effects in ThemeData visually consistent with the style the buttons ElevatedButton, OutlinedButton and TextButton with their own state effects use by default. It is not an exact match with the ButtonStyleButton buttons, the common class for the newer buttons, but very close. Because of for example the white opacity overlay used on primary colored button ElevatedButton, it cannot be matched exactly in all situations. It is still visually very similar on most widgets, and does not stick out like the grey splashes do otherwise when using primary color blended themes.

For ToggleButtons and legacy buttons RaisedButton, OutlineButton and FlatButton to always match the style the new buttons use, even when interactionEffects style is disabled, they also always use the same effect as interactionEffects provides on overall theme, so that they always match the ButtonStyleButton buttons as closely as possible.

The effects provided by interactionEffects are more visible on large surface ink effects, like e.g. on the ListTile and SwitchListTile taps, focus and hover.

Defaults to true.

Implementation

final bool interactionEffects;