performLayout method
Hook for subclasses to perform layout within the given constraints.
Implementation
@override
Size performLayout(BoxConstraints constraints) {
final display = widget as SevenSegmentDisplay;
final count = display.value.length;
final w = count > 0 ? (count * 6 - 1) : 0;
return constraints.constrain(Size(w, 5));
}