focusColor property
The color for the button when it has the input focus.
If ThemeData.useMaterial3 is set to true, this focusColor will be mapped
to be the ButtonStyle.overlayColor in focused state, which paints on top of
the button, as an overlay. Therefore, using a color with some transparency
is recommended. For example, one could customize the focusColor below:
IconButton(
focusColor: Colors.orange.withValues(alpha: 0.3),
icon: const Icon(Icons.sunny),
onPressed: () {
// ...
},
)
Defaults to ThemeData.focusColor of the ambient theme.
Implementation
final Color? focusColor;