tryClearWidth method

void tryClearWidth()

Clear width if it's been set and the label has changed.

This allows us to re-calculate an appropriate width and set it afterwards.

Implementation

void tryClearWidth() {
  if (_textWidth == 0 && width.isNotEmpty) {
    width = '';
  }
}