onBuild method

  1. @mustCallSuper
  2. @protected
void onBuild(
  1. BuildContext context
)

Called during the build phase of the widget.

If the key has changed, the target is disposed and rebuilt.

Implementation

@mustCallSuper
@protected
void onBuild(BuildContext context) {
  if (currentKey != key?.call()) {
    onDisposeTarget(target);
    onInitState();
  }
}