performLayout method

  1. @override
void performLayout(
  1. Constraints constraints
)
override

Called to perform the actual layout computation for this render object.

Implementation

@override
void performLayout(Constraints constraints) {
  final desiredWidth = (_displayText.length + 1).clamp(
    1,
    Constraints.infinity,
  );
  final boxConstraints = BoxConstraints.asBox(constraints);
  size = boxConstraints.constrain(Size(desiredWidth, 1));
}