update method
- covariant ListWheelViewport newWidget
override
Change the widget used to configure this element.
The framework calls this function when the parent wishes to use a different widget to configure this element. The new widget is guaranteed to have the same runtimeType as the old widget.
This function is called only during the "active" lifecycle state.
Implementation
@override
void update(ListWheelViewport newWidget) {
final ListWheelViewport oldWidget = widget as ListWheelViewport;
super.update(newWidget);
final ListWheelChildDelegate newDelegate = newWidget.childDelegate;
final ListWheelChildDelegate oldDelegate = oldWidget.childDelegate;
if (newDelegate != oldDelegate &&
(newDelegate.runtimeType != oldDelegate.runtimeType || newDelegate.shouldRebuild(oldDelegate))) {
performRebuild();
renderObject.markNeedsLayout();
}
}