checkPreviousNesteds method

Widget checkPreviousNesteds(
  1. Widget view,
  2. RixaPage parent,
  3. BuildContext context
)

Implementation

Widget checkPreviousNesteds(
    Widget view, RixaPage parent, BuildContext context) {
  if (parent.parent != null && parent.parent is NestedPage) {
    NestedPage nested = parent.parent! as NestedPage;
    Widget addedView = nested.builder(context,
        RouteProperties(route: path, name: "", params: Get.parameters), view);
    PageBase? grandParent = parent.parent!.parent;
    return grandParent != null && grandParent is RixaPage
        ? checkPreviousNesteds(addedView, grandParent, context)
        : addedView;
  } else {
    return view;
  }
}