RenderComparison enum

The description of the difference between two objects, in the context of how it will affect the rendering.

Used by TextSpan.compareTo and TextStyle.compareTo.

The values in this enum are ordered such that they are in increasing order of cost. A value with index N implies all the values with index less than N. For example, layout (index 3) implies paint (2).

Inheritance

Values

identical → const RenderComparison

The two objects are identical (meaning deeply equal, not necessarily dart:core.identical).

metadata → const RenderComparison

The two objects are identical for the purpose of layout, but may be different in other ways.

For example, maybe some event handlers changed.

paint → const RenderComparison

The two objects are different but only in ways that affect paint, not layout.

For example, only the color is changed.

RenderObject.markNeedsPaint would be necessary to handle this kind of change in a render object.

layout → const RenderComparison

The two objects are different in ways that affect layout (and therefore paint).

For example, the size is changed.

This is the most drastic level of change possible.

RenderObject.markNeedsLayout would be necessary to handle this kind of change in a render object.

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

values → const List<RenderComparison>
A constant List of the values in this enum, in order of their declaration.