onChange property
The callback function reference that is called after
the Switcher
value changes.
Triggered when the inner control value is changed.
The onChange function must not be null
.
Example of usage:
void myOnChangeMethod(bool value) {
print(value); // Do something
}
Switcher(onChange: myOnChangeMethod);
Implementation
final void Function(bool value) onChange;