onReady method
Implementation
@mustCallSuper
void onReady() {
if (_ready) return;
_ready = true;
// Restore the previous parent controller after initialization completes
// This properly handles nested controller initialization
if (currentParentController == this) {
currentParentController = _savedParent;
_savedParent = null; // Clear saved reference
}
ZenLogger.logInfo('Controller $runtimeType ready');
if (ZenConfig.enablePerformanceMetrics) {
ZenMetrics.incrementCounter('controller.ready');
}
}