focusColor property Null safety

Color? focusColor
final

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.withOpacity(0.3),
)

Defaults to ThemeData.focusColor of the ambient theme.

Implementation

final Color? focusColor;