Esempio n. 1
0
        public void onDragMove(ScrollUpdateNotification notification)
        {
            if (this.widget._isRefreshing || this.widget._isComplete)
            {
                return;
            }

            if (this.widget.autoLoad)
            {
                if (this.widget.up &&
                    notification.metrics.extentBefore() <= this.widget.triggerDistance)
                {
                    this.widget.mode = RefreshStatus.refreshing;
                }

                if (!this.widget.up &&
                    notification.metrics.extentAfter() <= this.widget.triggerDistance)
                {
                    this.widget.mode = RefreshStatus.refreshing;
                }
            }
        }
Esempio n. 2
0
        bool _handleScrollMoving(ScrollUpdateNotification notification)
        {
            if (this._measure(notification) != -1.0)
            {
                this.offsetLis.value = this._measure(notification);
            }

            GestureProcessor topWrap    = this._headerKey.currentState as GestureProcessor;
            GestureProcessor bottomWrap = this._footerKey.currentState as GestureProcessor;

            if (this.widget.enablePullUp)
            {
                bottomWrap.onDragMove(notification);
            }

            if (this.widget.enablePullDown)
            {
                topWrap.onDragMove(notification);
            }

            return(false);
        }
Esempio n. 3
0
        public void onDragMove(ScrollUpdateNotification notification)
        {
            if (!this.widget._isScrollToOutSide(notification))
            {
                return;
            }

            if (this.widget._isComplete || this.widget._isRefreshing)
            {
                return;
            }

            var offset = this._measure(notification);

            if (offset >= 1.0)
            {
                this.widget.mode = RefreshStatus.canRefresh;
            }
            else
            {
                this.widget.mode = RefreshStatus.idle;
            }
        }