scaleSecondary method
- BoxConstraints constraints
Scales secondary according to the constraints
and _lastConstraints
difference.
Implementation
void scaleSecondary(BoxConstraints constraints) {
if (_lastConstraints == constraints) {
return;
}
if (_lastConstraints != null) {
final dif =
(constraints.maxWidth + constraints.maxHeight) -
(_lastConstraints!.maxWidth + _lastConstraints!.maxHeight);
secondaryWidth.value = _applySWidth(secondaryWidth.value + dif * 0.07);
secondaryHeight.value = _applySHeight(secondaryHeight.value + dif * 0.07);
}
_lastConstraints = constraints;
}