public SmartRefresher( ScrollView child, float initialOffset = 0f, IndicatorBuilder headerBuilder = null, IndicatorBuilder footerBuilder = null, Config headerConfig = null, Config footerConfig = null, bool enablePullUp = DefaultConstants.default_enablePullUp, bool enablePullDown = DefaultConstants.default_enablePullDown, bool enableOverScroll = DefaultConstants.default_enableOverScroll, OnRefresh onRefresh = null, OnOffsetChange onOffsetChange = null, RefreshController controller = null, NotificationListenerCallback <ScrollNotification> onNotification = null, Key key = null ) : base(key) { this.child = child; this.initialOffset = initialOffset; this.headerBuilder = headerBuilder ?? ((context, mode) => new SmartRefreshHeader(mode, RefreshHeaderType.other)); this.footerBuilder = footerBuilder ?? ((context, mode) => new SmartRefreshFooter(mode)); this.headerConfig = headerConfig ?? new RefreshConfig(); this.footerConfig = footerConfig ?? new LoadConfig(triggerDistance: 0); this.enablePullUp = enablePullUp; this.enablePullDown = enablePullDown; this.enableOverScroll = enableOverScroll; this.onRefresh = onRefresh; this.onOffsetChange = onOffsetChange; this.controller = controller ?? new RefreshController(); this.onNotification = onNotification; }
public CenteredRefresher( List <Widget> children, IndicatorBuilder headerBuilder = null, IndicatorBuilder footerBuilder = null, Config headerConfig = null, Config footerConfig = null, bool enablePullUp = DefaultConstants.default_enablePullUp, bool enablePullDown = DefaultConstants.default_enablePullDown, bool enableOverScroll = DefaultConstants.default_enableOverScroll, OnRefresh onRefresh = null, OnOffsetChange onOffsetChange = null, RefreshController controller = null, NotificationListenerCallback <ScrollNotification> onNotification = null, Key key = null, int centerIndex = 0 ) : base(key) { this.children = children; this.headerBuilder = headerBuilder ?? ((context, mode) => new SmartRefreshHeader(mode, RefreshHeaderType.other)); this.footerBuilder = footerBuilder ?? ((context, mode) => new SmartRefreshFooter(mode)); this.headerConfig = headerConfig ?? new RefreshConfig(); this.footerConfig = footerConfig ?? new LoadConfig(triggerDistance: 0); this.enablePullUp = enablePullUp; this.enablePullDown = enablePullDown; this.enableOverScroll = enableOverScroll; this.onRefresh = onRefresh; this.onOffsetChange = onOffsetChange; this.controller = controller ?? new RefreshController(); this.onNotification = onNotification; this.centerIndex = centerIndex; }
public SmartRefresher( ScrollView child, float initialOffset = 0f, IndicatorBuilder headerBuilder = null, IndicatorBuilder footerBuilder = null, Config headerConfig = null, Config footerConfig = null, bool enablePullUp = DefaultConstants.default_enablePullUp, bool enablePullDown = DefaultConstants.default_enablePullDown, bool enableOverScroll = DefaultConstants.default_enableOverScroll, bool reverse = false, OnRefresh onRefresh = null, OnOffsetChange onOffsetChange = null, RefreshController controller = null, NotificationListenerCallback <ScrollNotification> onNotification = null, bool hasBottomMargin = false, Key key = null ) : base(key) { this.child = child; this.initialOffset = initialOffset; this.headerBuilder = headerBuilder ?? ((context, mode) => new SmartRefreshHeader(mode, RefreshHeaderType.other)); this.footerBuilder = footerBuilder ?? ((context, mode) => new SmartRefreshFooter( mode: mode, hasBottomMargin ? EdgeInsets.only(0, 16, 0, 16 + CConstant.TabBarHeight + MediaQuery.of(context: context).padding.bottom) : null )); this.headerConfig = headerConfig ?? new RefreshConfig(); this.footerConfig = footerConfig ?? new LoadConfig(triggerDistance: 0); this.enablePullUp = enablePullUp; this.enablePullDown = enablePullDown; this.enableOverScroll = enableOverScroll; this.onRefresh = onRefresh; this.onOffsetChange = onOffsetChange; this.controller = controller ?? new RefreshController(); this.onNotification = onNotification; this.reverse = reverse; }