void _addScrollingNotifierListener() { if (this.widget.closeOnScroll) { this._scrollPosition = Scrollable.of(this.context)?.position; if (this._scrollPosition != null) { this._scrollPosition.isScrollingNotifier.addListener(this._isScrollingListener); } } }
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); } }