RenderComparison enum Null safety
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).
Constructors
- RenderComparison()
-
const
Values
- identical → const RenderComparison
-
The two objects are identical (meaning deeply equal, not necessarily dart:core.identical).
RenderComparison()
- 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.
RenderComparison()
- 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.
RenderComparison()
- 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.
RenderComparison()
Properties
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent 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.
[identical, metadata, paint, layout]