renderView method

Widget renderView()

Implementation

Widget renderView() {
  return Stack(
    fit: StackFit.expand,
    // overflow: Overflow.visible,
    clipBehavior: Clip.none,
    children: [
      if (widget._widgets)
        Positioned(
          top: _offset.dy,
          left: _offset.dx,
          child: Column(
            crossAxisAlignment: CrossAxisAlignment.start,
            children: [
              if (widget.children != null)
                _Lane(
                  cupertinoDevice: widget.cupertinoDevice,
                  androidDevice: widget.androidDevice,
                  orientation: widget.orientation,
                  laneBuilder: widget.laneBuilder,
                  title: widget.childrenLabel ?? '',
                  scale: _scale,
                  size: size,
                  children: widget.children!
                      .map(
                        (e) => CustomScreen(
                          size: size,
                          child: e,
                        ),
                      )
                      .toList(),
                  crossAxisCount: widget.crossAxisCount,
                  shadow: const BoxShadow(
                    color: Colors.black45,
                    offset: Offset(2, 2),
                    blurRadius: 10,
                    spreadRadius: 2,
                  ),
                ),
              if (widget.sizedChildren != null)
                _Lane(
                  cupertinoDevice: widget.cupertinoDevice,
                  androidDevice: widget.androidDevice,
                  orientation: widget.orientation,
                  laneBuilder: widget.laneBuilder,
                  title: widget.sizedChildrenLabel ?? '',
                  scale: _scale,
                  size: size,
                  children: widget.sizedChildren!,
                  crossAxisCount: widget.crossAxisCount,
                  shadow: const BoxShadow(
                    color: Colors.black45,
                    offset: Offset(2, 2),
                    blurRadius: 10,
                    spreadRadius: 2,
                  ),
                ),
              if (widget.customLanes != null)
                for (final lane in widget.customLanes!)
                  _Lane(
                    cupertinoDevice: widget.cupertinoDevice,
                    androidDevice: widget.androidDevice,
                    orientation: widget.orientation,
                    laneBuilder: widget.laneBuilder,
                    title: lane.title,
                    scale: _scale,
                    size: size,
                    crossAxisCount: widget.crossAxisCount,
                    children: lane.children,
                    shadow: const BoxShadow(
                      color: Colors.black45,
                      offset: Offset(2, 2),
                      blurRadius: 10,
                      spreadRadius: 2,
                    ),
                  ),
            ],
          ),
        ),
      if (!widget._widgets) ...[
        Positioned(
          top: _offset.dy,
          left: _offset.dx,
          child: Column(
            crossAxisAlignment: CrossAxisAlignment.start,
            children: [
              _Lane(
                cupertinoDevice: widget.cupertinoDevice,
                androidDevice: widget.androidDevice,
                orientation: widget.orientation,
                scale: _scale,
                title: 'Main',
                laneBuilder: widget.laneBuilder,
                size: size,
                crossAxisCount: widget.crossAxisCount,
                children: [
                  if (initialRoute != null)
                    _addChild(
                      RouteSettings(name: initialRoute),
                      label: 'Initial Route',
                    ),
                  if (home != null)
                    _addChild(
                      null,
                      label: 'Home',
                      child: home,
                    ),
                ],
              ),
              if (routes != null)
                _Lane(
                  cupertinoDevice: widget.cupertinoDevice,
                  androidDevice: widget.androidDevice,
                  orientation: widget.orientation,
                  title: 'Routes',
                  scale: _scale,
                  laneBuilder: widget.laneBuilder,
                  size: size,
                  crossAxisCount: widget.crossAxisCount,
                  children: [
                    for (var i = 0; i < routes!.keys.length; i++)
                      _addChild(
                        RouteSettings(name: routes!.keys.toList()[i]),
                        label: routes!.keys.toList()[i],
                      ),
                  ],
                ),
              if (widget.children != null)
                _Lane(
                  cupertinoDevice: widget.cupertinoDevice,
                  androidDevice: widget.androidDevice,
                  orientation: widget.orientation,
                  laneBuilder: widget.laneBuilder,
                  title: widget.childrenLabel ?? '',
                  scale: _scale,
                  size: size,
                  children: widget.children!
                      .map((e) => _addChild(
                            null,
                            label: null,
                            child: e,
                            customWidget: true,
                          ))
                      .toList(),
                  crossAxisCount: widget.crossAxisCount,
                ),
              if (widget.customRoutes != null)
                _Lane(
                  cupertinoDevice: widget.cupertinoDevice,
                  androidDevice: widget.androidDevice,
                  orientation: widget.orientation,
                  laneBuilder: widget.laneBuilder,
                  title: 'Custom Routes',
                  scale: _scale,
                  size: size,
                  crossAxisCount: widget.crossAxisCount,
                  children: [
                    for (var i = 0; i < widget.customRoutes!.length; i++)
                      _addChild(
                        widget.customRoutes![i],
                        label: widget.customRoutes![i].name,
                      ),
                  ],
                ),
              if (widget.customLanes != null)
                for (final lane in widget.customLanes!)
                  _Lane(
                    cupertinoDevice: widget.cupertinoDevice,
                    androidDevice: widget.androidDevice,
                    orientation: widget.orientation,
                    laneBuilder: widget.laneBuilder,
                    title: lane.title,
                    scale: _scale,
                    size: size,
                    crossAxisCount: widget.crossAxisCount,
                    children: lane.children
                        .map((e) => _addChild(
                              null,
                              label: e.label,
                              child: e.child,
                              customSize: e.size,
                              customWidget: true,
                            ))
                        .toList(),
                  ),
            ],
          ),
        ),
      ],
    ],
  );
}