compareTo method

RenderComparison compareTo (TextStyle other)

Describe the difference between this style and another, in terms of how much damage it will make to the rendering.

See also:

Implementation

RenderComparison compareTo(TextStyle other) {
  if (identical(this, other))
    return RenderComparison.identical;
  if (inherit != other.inherit ||
      fontFamily != other.fontFamily ||
      fontSize != other.fontSize ||
      fontWeight != other.fontWeight ||
      fontStyle != other.fontStyle ||
      letterSpacing != other.letterSpacing ||
      wordSpacing != other.wordSpacing ||
      textBaseline != other.textBaseline ||
      height != other.height ||
      locale != other.locale ||
      foreground != other.foreground ||
      background != other.background ||
      !listEquals(shadows, other.shadows))
    return RenderComparison.layout;
  if (color != other.color ||
      decoration != other.decoration ||
      decorationColor != other.decorationColor ||
      decorationStyle != other.decorationStyle)
    return RenderComparison.paint;
  return RenderComparison.identical;
}