Esempio n. 1
0
 void _addScrollingNotifierListener()
 {
     if (this.widget.closeOnScroll)
     {
         this._scrollPosition = Scrollable.of(this.context)?.position;
         if (this._scrollPosition != null)
         {
             this._scrollPosition.isScrollingNotifier.addListener(this._isScrollingListener);
         }
     }
 }
Esempio n. 2
0
        public override void didChangeDependencies()
        {
            base.didChangeDependencies();
            if (this._position != null)
            {
                this._position.isScrollingNotifier.removeListener(this._isScrollingListener);
            }

            this._position = Scrollable.of(this.context)?.position;
            if (this._position != null)
            {
                this._position.isScrollingNotifier.addListener(this._isScrollingListener);
            }
        }