setSelectedSate method

void setSelectedSate()

Implementation

void setSelectedSate() {
  if (this.selectedText != null && this.selectedText!.isNotEmpty) {
    setState(() {
      formState?.didChange(this.selectedText);
    });

    if (widget.onSelect != null) {
      var key = _itens
              .where((item) => item.presentation == this.selectedText)
              .first
              .value ??
          null;

      widget.onSelect!(key);
    }
  }
}