updateLayout method
Implementation
TextExtra? updateLayout(int id, double width, List<dynamic> layoutNode) {
VirtualNode? node = _virtualNodes[id];
if (node is! TextVirtualNode || node._parent != null) {
return null;
}
double leftPadding = 0.0;
double topPadding = 0.0;
double rightPadding = 0.0;
double bottomPadding = 0.0;
try {
leftPadding = layoutNode[5].toDouble();
topPadding = layoutNode[6].toDouble();
rightPadding = layoutNode[7].toDouble();
bottomPadding = layoutNode[8].toDouble();
} catch (err) {
//
}
final data = node.createData(width - leftPadding - rightPadding, FlexMeasureMode.exactly);
return TextExtra(
data,
leftPadding,
rightPadding,
bottomPadding,
topPadding,
);
}