secondaryVariant property

Color? secondaryVariant
final

A darker version of the secondary color.

In Flutter SDK the secondaryVariant color is not used by in any built-in widgets default themes or predefined widget behavior. It is an excellent property to use if you need a custom color for custom widgets accessible via your application's ThemeData, and that is not used as default color by any built-in widgets. So you are Flutter 2.5.2 and earlier version free to set it to whatever color you need and not affect any built-in widgets theme based colors.

The property is being deprecated in Flutter SDK and will be replaced by a new property called secondaryContainer. It is deprecated from master v2.6.0-0.0.pre, but has not yet reached stable (2.8.1). See https://github.com/flutter/flutter/issues/89852.

If not defined, and if there is no colorScheme defined, it will be computed from secondary color, and if it is not defined either then from primary color.

Implementation

final Color? secondaryVariant;