performLayout method
Perform layout with box constraints
This is the main layout entry point. Subclasses should override this to implement their specific layout behavior.
Implementation
@override
void performLayout(Constraints constraints) {
if (!constraints.isNormalized) {
throw ArgumentError.value(
constraints,
'constraints',
'must be normalized and non-negative',
);
}
final boxConstraints = constraints is BoxConstraints
? constraints
: BoxConstraints(
maxWidth: constraints.maxWidth,
maxHeight: constraints.maxHeight,
);
if (!boxConstraints.isNormalized) {
throw ArgumentError.value(
constraints,
'constraints',
'must be normalized and non-negative',
);
}
performBoxLayout(boxConstraints);
}