public static bool recommendDeferredLoadingForContext(BuildContext context) { _ScrollableScope widget = context.getElementForInheritedWidgetOfExactType <_ScrollableScope>()?.widget as _ScrollableScope; if (widget == null) { return(false); } return(widget.position.recommendDeferredLoading(context)); }
public override Widget build(BuildContext context) { D.assert(this.position != null); Widget result = new _ScrollableScope( scrollable: this, position: this.position, child: new RawGestureDetector( key: this._gestureDetectorKey, gestures: this._gestureRecognizers, behavior: HitTestBehavior.opaque, child: new IgnorePointer( key: this._ignorePointerKey, ignoring: this._shouldIgnorePointer, child: this.widget.viewportBuilder(context, this.position) ) ) ); return(this._configuration.buildViewportChrome(context, result, this.widget.axisDirection)); }
public static ScrollableState of(BuildContext context) { _ScrollableScope widget = context.dependOnInheritedWidgetOfExactType <_ScrollableScope>(); return(widget == null ? null : widget.scrollable); }
public static ScrollableState of(BuildContext context) { _ScrollableScope widget = (_ScrollableScope)context.inheritFromWidgetOfExactType(typeof(_ScrollableScope)); return(widget == null ? null : widget.scrollable); }