getDepthFor method
int
getDepthFor(
- ConstrainedNode constrainedNode,
- bool? parentSizeConfirmed,
- double? resolvedWidth,
- double? resolvedHeight,
Implementation
int getDepthFor(ConstrainedNode constrainedNode, bool? parentSizeConfirmed,
double? resolvedWidth, double? resolvedHeight) {
if (parentSizeConfirmed == false) {
if (constrainedNode.isParent()) {
/// The width and height can be calculated directly without relying on parent
if ((width >= 0 ||
width == wrapContent ||
(width == matchParent && resolvedWidth != wrapContent)) &&
(height >= 0 ||
height == wrapContent ||
(height == matchParent && resolvedHeight != wrapContent))) {
return 0;
}
}
}
return constrainedNode.getDepth(
parentSizeConfirmed, resolvedWidth, resolvedHeight);
}