didUpdateWidget method
Called whenever the widget configuration changes.
Implementation
@override
void didUpdateWidget(Slider oldWidget) {
super.didUpdateWidget(oldWidget);
widget._state = this;
if (widget.focused != oldWidget.focused) {
if (widget.focused) {
_focusNode.requestFocus();
} else {
_focusNode.unfocus();
}
}
}