buildNestedScrollView method
Simple implementation of Nested Scroll View which user can use it with easy configuration
Implementation
NestedScrollView buildNestedScrollView({
@required bool titleVisibility,
@required bool leadingVisibility,
@required bool tabBarVisibility,
@required Widget bodyWidget,
bool scrollableTab,
List<Widget> tabWidgetList,
TabController tabController,
Widget titleWidget,
Widget leadingWidget,
Color backgroundColor,
bool centerTitle = false,
bool floating = false,
}) {
return NestedScrollView(
headerSliverBuilder: (BuildContext context, bool boxIsScrolled) {
return <Widget>[
SliverAppBar(
backgroundColor: backgroundColor,
leading: leadingVisibility ? leadingWidget : null,
title: titleVisibility ? titleWidget : null,
bottom: tabBarVisibility
? TabBar(
isScrollable: scrollableTab,
tabs: tabWidgetList,
controller: tabController,
indicatorWeight: 4.0,
)
: null,
centerTitle: centerTitle,
floating: floating,
pinned: true,
automaticallyImplyLeading: false,
forceElevated: true,
),
];
},
body: bodyWidget,
);
}