setFieldOptions method
Set the options for a field in the form If the field does not exist, it will throw an exception
Implementation
void setFieldOptions(String key, dynamic value, {bool refreshState = true}) {
  if (!_data.containsKey(key)) {
    throw Exception("Field $key does not exist in the form");
  }
  _cast[key]?.metaData!["options"] = value;
  if (!refreshState) return;
  NyForm.stateSetOptions(stateName, key, value);
}