value property

  1. @override
int value
override

A 32 bit value representing this color.

The bits are assigned as follows:

  • Bits 24-31 are the alpha value.
  • Bits 16-23 are the red value.
  • Bits 8-15 are the green value.
  • Bits 0-7 are the blue value.

Implementation

@override
int get value {
  Color? result = _currentTheme[this] as Color?;
  result ??= _defaultTheme[this] as Color?;
  result ??= defaultColor;
  if (result == null) throw ConstThemeException('Theme color "$id" is not defined.');
  if (_transformColor != null) result = _transformColor!(result);
  return result.value;
}