Line data Source code
1 : part of '../main.dart'; 2 : 3 : /// If the VRouteElement does not have a page to display, it should instantiate this class 4 : /// 5 : /// What is does is implementing [buildRoute] and [getPathFromName] methods for them 6 : mixin VRouteElementWithoutPage on VRouteElement { 7 12 : @override 8 : VRoute? buildRoute( 9 : VPathRequestData vPathRequestData, { 10 : required String? parentRemainingPath, 11 : required Map<String, String> parentPathParameters, 12 : }) { 13 : VRoute? childVRoute; 14 24 : for (var vRouteElement in stackedRoutes) { 15 12 : childVRoute = vRouteElement.buildRoute( 16 : vPathRequestData, 17 : parentRemainingPath: parentRemainingPath, 18 : parentPathParameters: parentPathParameters, 19 : ); 20 : if (childVRoute != null) { 21 12 : return VRoute( 22 12 : vRouteElementNode: VRouteElementNode(this, 23 12 : stackedVRouteElementNode: childVRoute.vRouteElementNode), 24 12 : pages: childVRoute.pages, 25 12 : pathParameters: { 26 12 : ...parentPathParameters, 27 12 : ...childVRoute.pathParameters, 28 : }, 29 36 : vRouteElements: <VRouteElement>[this] + childVRoute.vRouteElements, 30 : ); 31 : } 32 : } 33 : 34 : return null; 35 : } 36 : }