UINavigableComponent constructor
UINavigableComponent(})
Implementation
UINavigableComponent(super.parent, Iterable<String> routes,
{dynamic componentClass,
dynamic componentStyle,
super.classes,
super.classes2,
super.style,
super.style2,
super.id,
super.inline,
bool renderOnConstruction = false})
: _routes = routes.toList(),
super(componentClass: [
UINavigableComponent.componentClass,
componentClass
], renderOnConstruction: renderOnConstruction) {
_normalizeRoutes();
if (findRoutes!) updateRoutes();
//if (this.routes.isEmpty) throw ArgumentError('Empty routes');
var currentRoute = UINavigator.currentRoute;
var currentRouteParameters = UINavigator.currentRouteParameters;
if (currentRoute != null && currentRoute.isNotEmpty) {
if (_routes.contains(currentRoute)) {
_currentRoute = currentRoute;
_currentRouteParameters = currentRouteParameters;
}
}
_currentRoute ??= _routes.isNotEmpty ? _routes[0] : '';
UINavigator.get().registerNavigable(this);
if (renderOnConstruction) {
callRender();
}
}