initState method
Initializes the app state, setting up global references and theme.
This method runs once on widget creation, assigning Arcane.$app for global access,
caching the initial ArcaneTheme, and logging app initialization. It prepares
routeFactory for navigation and announces the app title, integrating with
Serviced
for startup completion. Ensures theme is ready for immediate use
in child components like Section or Sheet, with performance focus on
synchronous setup to avoid jank on first frame.
Implementation
@override
void initState() {
routeFactory = widget.onGenerateRoute;
Arcane.$app = this;
super.initState();
_theme = widget.theme ?? const ArcaneTheme();
actionedAnnounce(
"${(widget.title.trim().isEmpty ? null : widget.title) ?? "Arcane App"} Initialized");
}