widget property

T get widget

Implementation

T get widget => _widget;
set widget (T newWidget)

If widget is updated while this Node is present in the Node tree, widgetWillUpdate and widgetDidUpdate are called.

Implementation

set widget(final T newWidget) {
  final oldWidget = widget;

  if (newWidget != oldWidget) {
    widgetWillUpdate(newWidget);
    _widget = newWidget;
    widgetDidUpdate(oldWidget);
  }
}