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) ||
      !listEquals(fontFeatures, other.fontFeatures) ||
      !listEquals(fontFamilyFallback, other.fontFamilyFallback))
    return RenderComparison.layout;
  if (color != other.color ||
      backgroundColor != other.backgroundColor ||
      decoration != other.decoration ||
      decorationColor != other.decorationColor ||
      decorationStyle != other.decorationStyle ||
      decorationThickness != other.decorationThickness)
    return RenderComparison.paint;
  return RenderComparison.identical;
}