build method

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

Builds the screen widget, automatically selecting SliverScreen for sliver content or FillScreen for regular widgets. Conditionally constructs a Bar header if title, subtitle, or actions are provided, integrating with AppBar semantics. Applies ArcaneTheme for styling, supports BottomNavigationBar via navigation context, and enables efficient scrolling with custom physics and controllers. For sliver content, leverages SliverAppBar compatibility; for non-sliver, uses SafeArea wrapping implicitly through FillScreen. This method promotes extensibility by delegating body rendering while handling layout orchestration for optimal performance in large UIs.

Implementation

@override
Widget build(BuildContext context) => child.isSliver(context)
    ? SliverScreen(
        sliver: child,
        overrideBackgroundColor: overrideBackgroundColor,
        fab: fab,
        footer: footer,
        header: header ??
            ((title != null || subtitle != null || actions != null)
                ? Bar(
                    backButton: backButtonMode,
                    titleText: title,
                    subtitleText: subtitle,
                    trailing: actions ?? [],
                  )
                : null),
        gutter: gutter,
        loadingProgress: loadingProgress,
        loadingProgressIndeterminate: loadingProgressIndeterminate,
        showLoadingSparks: showLoadingSparks,
        foreground: foreground,
        background: background,
        sidebar: sidebar,
        scrollController: scrollController,
        sidebarController: sidebarController,
        physics: physics,
      )
    : FillScreen(
        fab: fab,
        overrideBackgroundColor: overrideBackgroundColor,
        // fab: fab,
        footer: footer,
        header: header ??
            ((title != null || subtitle != null || actions != null)
                ? Bar(
                    backButton: backButtonMode,
                    titleText: title,
                    subtitleText: subtitle,
                    trailing: actions ?? [],
                  )
                : null),
        gutter: gutter,
        loadingProgress: loadingProgress,
        loadingProgressIndeterminate: loadingProgressIndeterminate,
        showLoadingSparks: showLoadingSparks,
        foreground: foreground,
        background: background,
        sidebar: sidebar,
        child: child,
      );