color property

Color? color
final

The color for descendant Text and Icon widgets if the button is enabled and not selected.

If onPressed is not null, this color will be used for values in isSelected that are false.

If this property is null, then ToggleButtonTheme.of(context).color is used. If ToggleButtonsThemeData.color is also null, then Theme.of(context).colorScheme.onSurface is used.

Implementation

final Color? color;