buildAppBar method

PreferredSizeWidget? buildAppBar(
  1. BuildContext context
)

Implementation

PreferredSizeWidget? buildAppBar(BuildContext context) {
  Widget? current = (appBarTitleText != null ||
          appBarTitle != null ||
          appBarBottom != null ||
          appBarActions != null ||
          appBarLeading != null ||
          appBarAction != null
      ? BaseAppBar(
          enableLeading: enableLeading,
          actions: appBarActions,
          isMaybePop: isMaybePop,
          bottom: appBarBottom,
          titleText: appBarTitleText,
          title: appBarTitle,
          elevation: elevation,
          action: appBarAction,
          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)
      : null);
  if (current == null) return null;
  return PreferredSize(
      preferredSize: Size.fromHeight(appBarHeight ?? kToolbarHeight - 10),
      child: current);
}