message static method

dynamic message({
  1. required BaseRefreshController controller,
  2. ScrollController? scrollController,
  3. VoidCallback? onLoading,
  4. Widget? footer,
  5. required Widget sliver,
})

Implementation

static message(
    {required BaseRefreshController controller,
    ScrollController? scrollController,
    VoidCallback? onLoading,
    Widget? footer,
    required Widget sliver}) {
  return BaseSmartRefresher(
    enablePullDown: false,
    onLoading: onLoading,
    footer: footer ?? ClassicFooter(),
    enablePullUp: true,
    controller: controller,
    child: Scrollable(
      controller: scrollController,
      axisDirection: AxisDirection.up,
      viewportBuilder: (context, offset) {
        return BaseExpandedViewport(
          offset: offset,
          axisDirection: AxisDirection.up,
          slivers: <Widget>[
            BaseSliverExpanded(),
            sliver,
          ],
        );
      },
    ),
  );
}