getOnChanged method

Function getOnChanged(
  1. String key, {
  2. Object? converterParameter,
})

Returns a funcation that can be used with the OnChanged event on many StatefulWidgets.

Passes any changes made by the user back to the view model

Implementation

Function getOnChanged(String key, {Object? converterParameter}) {
  Binding binding = _getBinding(key);
  assert(binding.bindingDirection == BindingDirection.TwoWay);
  return (Object newValue) =>
      {setValue(key, newValue, converterParameter: converterParameter)};
}