focusColor property Null safety

Color? focusColor

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:

  icon: const Icon(Icons.sunny),
  onPressed: () {
    // ...

Defaults to ThemeData.focusColor of the ambient theme.


final Color? focusColor;