compareTo method Null safety

RenderComparison compareTo(
  1. 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 ||
      leadingDistribution != other.leadingDistribution ||
      locale != other.locale ||
      foreground != other.foreground ||
      background != other.background ||
      !listEquals(shadows, other.shadows) ||
      !listEquals(fontFeatures, other.fontFeatures) ||
      !listEquals(fontVariations, other.fontVariations) ||
      !listEquals(fontFamilyFallback, other.fontFamilyFallback) ||
      overflow != other.overflow) {
    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;
}