XCustomScrollView constructor
XCustomScrollView({
- Key? key,
- bool? bottom = true,
- bool? top,
- bool? scrollbar = true,
- Function? onRefresh,
- double? appbarHeight,
- Function? onLoading,
- dynamic init(
- ScrollController,
- RefreshController
- bool? resizeToAvoidBottomInset,
- required PageStatus status,
- required Function? slivers,
- Widget? emptyWidget,
- Widget? errorWidget,
- XCustomScrollViewAppbar? appbar,
- Color backgroundColor = Colors.transparent,
- Widget? bottomAppBar,
- AppBar? xAppBar,
- XBottomAppBarConfig? bottomAppBarConfig,
- Widget? headerLoading,
- Widget? loadingWidget,
Implementation
XCustomScrollView(
{Key? key,
this.bottom = true,
this.top,
this.scrollbar = true,
this.onRefresh,
this.appbarHeight,
this.onLoading,
this.init,
this.resizeToAvoidBottomInset,
required this.status,
required this.slivers,
this.emptyWidget,
this.errorWidget,
this.appbar,
this.backgroundColor = Colors.transparent,
this.bottomAppBar,
this.xAppBar,
this.bottomAppBarConfig,
this.headerLoading,
this.loadingWidget,
this.footer})
: super(key: key) {
headerLoading = this.headerLoading;
list = [];
if (status != PageStatus.loading) {
list = List.from(slivers!());
if (bottomAppBar != null) {
bottomAppBarConfig = bottomAppBarConfig ?? XBottomAppBarConfig();
list.add(
SliverToBoxAdapter(
child: SizedBox(
height: (this.bottomAppBarConfig?.bottomAppBarHeight ?? 0.0),
),
),
);
}
}
}