buildAppBar method

PreferredSizeWidget? buildAppBar(
  1. BuildContext context
)

Implementation

PreferredSizeWidget? buildAppBar(BuildContext context) {
  Widget? current = (appBarTitleText != null ||
          appBarTitle != null ||
          appBarBottom != null ||
          appBarActions != null ||
          flexibleSpace != null ||
          appBarLeading != null
      ? AppBar(
          actions: appBarActions,
          bottom: appBarBottom,
          title: appBarTitle ??
              (appBarTitleText == null ? null : Text(appBarTitleText!)),
          elevation: elevation,
          leading: appBarLeading,
          systemOverlayStyle: systemOverlayStyle,
          backgroundColor: appBarBackgroundColor,
          centerTitle: centerTitle,
          iconTheme: appBarIconTheme,
          actionsIconTheme: actionsIconTheme,
          automaticallyImplyLeading: automaticallyImplyLeading,
          bottomOpacity: bottomOpacity,
          excludeHeaderSemantics: excludeHeaderSemantics,
          flexibleSpace: flexibleSpace,
          leadingWidth: leadingWidth,
          notificationPredicate: notificationPredicate,
          primary: appBarPrimary,
          scrolledUnderElevation: scrolledUnderElevation,
          shadowColor: shadowColor,
          foregroundColor: appBarForegroundColor,
          shape: shape,
          surfaceTintColor: surfaceTintColor,
          titleSpacing: titleSpacing,
          titleTextStyle: titleTextStyle,
          toolbarHeight: toolbarHeight,
          toolbarOpacity: toolbarOpacity,
          toolbarTextStyle: toolbarTextStyle,
          forceMaterialTransparency: forceMaterialTransparency,
          clipBehavior: clipBehavior)
      : null);
  if (current == null) return null;
  return PreferredSize(
      preferredSize: Size.fromHeight(appBarHeight ?? kToolbarHeight - 10),
      child: current);
}