build method

  1. @override
Component build(
  1. BuildContext context
)

Describes the part of the user interface represented by this component.

Implementation

@override
Component build(BuildContext context) {
  final scope = OutletScope.of(context);
  final depth = scope.depth;
  if (depth >= scope.views.length) {
    return const SizedBox.shrink();
  }

  return OutletScope(
    views: scope.views,
    depth: depth + 1,
    child: _ViewHost(builder: scope.views[depth]),
  );
}