didUpdateWidget method
Called whenever the widget configuration changes.
Implementation
@override
void didUpdateWidget(TreeWidget<T> oldWidget) {
super.didUpdateWidget(oldWidget);
if (widget.focused != oldWidget.focused) {
_isFocused = widget.focused;
if (_isFocused) {
_focusNode.requestFocus();
} else {
_focusNode.unfocus();
}
}
updateFlatNodes();
}