updateText method

void updateText()

Implementation

void updateText() {
  // ignore: unnecessary_null_comparison
  if (widget.text == null) {
    firstDesc = secondDesc = '';
  } else if (widget.text.length > widget.limitCharacter) {
    firstDesc = widget.text.substring(0, widget.limitCharacter);
    secondDesc =
        widget.text.substring(widget.limitCharacter, widget.text.length);
  } else {
    firstDesc = widget.text;
    secondDesc = '';
  }
}