didUpdateWidget method

  1. @override
void didUpdateWidget(
  1. covariant T oldWidget
)
override

Switch out the old StatefulWidget object with the new one.

Implementation

@override
void didUpdateWidget(covariant T oldWidget) {
  super.didUpdateWidget(oldWidget);
  _statefulStates.removeWhere((key, value) => key == oldWidget);
  _statefulStates[widget] = this;
}