MenuRouter constructor
MenuRouter({
- Key? key,
- String? initialRoute,
- required BartRouteBuilder routesBuilder,
- required ValueNotifier<
int> indexNotifier, - required ValueNotifier<
BartMenuRouteType> routingTypeNotifier, - OnRouteChanged? onRouteChanged,
- required Widget child,
Implementation
MenuRouter({
super.key,
String? initialRoute,
required this.routesBuilder,
required this.navigationKey,
required this.indexNotifier,
required this.routingTypeNotifier,
this.onRouteChanged,
required super.child,
}) {
if (initialRoute != null) {
final index = _currentIndex(initialRoute);
indexNotifier.value = index;
}
}