onStatusChanged method

  1. @override
void onStatusChanged(
  1. FormeFieldChangedStatus<T?> status
)

override this method if you want to listen status changed

Implementation

@override
void onStatusChanged(FormeFieldChangedStatus<T?> status) {
  super.onStatusChanged(status);
  if (status.isValueChanged && status.value != null) {
    final String text = widget.displayStringForOption(status.value!);
    if (textEditingController.text != text) {
      textEditingController.text = text;
    }
  }
  if (status.isReadOnlyChanged && readOnly && hasFocusNode) {
    focusNode.unfocus();
  }
}