updater method

void updater(
  1. T newValue
)

Implementation

void updater(T newValue) {
  if (widget.onUpdate != null) {
    widget.onUpdate!(newValue);
  }
  setState(() {
    value = newValue;
  });
}