initRoute method
void
initRoute({})
Implementation
void initRoute(
{required String? route,
required RixaPage mainPage,
required BuildContext context,
required RixaPage currentPage,
Map<String, String?>? params}) {
_route =
RouteProperties(route: route, name: currentPage.name, params: params);
if (pageQue.isNotEmpty && pageQue.last.route == route) {
pageQue.removeLast();
}
_currentPage = currentPage;
if (kIsWeb && currentPage.description != null) {
FutureOr<String?> func = currentPage.description!(_route!);
if (func is Future<String?>) {
func.then((value) {
if (_currentPage == currentPage && value != null) {
_updatePageDescription(value, context);
}
});
} else {
if (func != null) {
_updatePageDescription(func, context);
}
}
}
//routedPageCounts++;
}