1. override
void activate()

Transition from the "inactive" to the "active" lifecycle state.

The framework calls this method when a previously deactivated element has been reincorporated into the tree. The framework does not call this method the first time an element becomes active (i.e., from the "initial" lifecycle state). Instead, the framework calls mount in that situation.

See the lifecycle documentation for Element for additional information.

Source

@override
void activate() {
  final bool hadDependencies = ((_dependencies != null && _dependencies.isNotEmpty) || _hadUnsatisfiedDependencies);
  super.activate(); // clears _dependencies, and sets active to true
  if (_dirty) {
    if (_inDirtyList) {
      owner.markNeedsToResortDirtyElements();
    } else {
      owner.scheduleBuildFor(this);
    }
  }
  if (hadDependencies)
    dependenciesChanged();
}