buildSliverAppBar method
create AppBar that is part of a CustomScrollView
Implementation
Widget? buildSliverAppBar(SinglePageModel pageModel, bool hasDrawer) {
if (pageModel.headerModel != null) {
dynamic appBar = _buildAppBar(pageModel.headerModel!,
scrollableView: true,
showNavigationIcon: pageModel.runtimeStyles?['showNavigationIcon']);
if (appBar is SliverAppBar || appBar is AnimatedAppBar) {
return appBar;
}
}
if (hasDrawer) {
return const SliverAppBar();
}
return null;
}