primaryColor property

Color primaryColor

A color used on interactive elements of the theme.

This color is generally used on text and icons in buttons and tappable elements. Defaults to CupertinoColors.activeBlue or CupertinoColors.activeOrange when brightness is light or dark.

If coming from a Material Theme and unspecified, primaryColor will be derived from the Material ThemeData's colorScheme.primary. However, in iOS styling, the primaryColor is more sparsely used than in Material Design where the primaryColor can appear on non-interactive surfaces like the AppBar background, TextField borders etc.


Color get primaryColor {
  return _primaryColor ??
      (_isLight ? CupertinoColors.activeBlue : CupertinoColors.activeOrange);