void _startResizeAnimation() { D.assert(this._overallMoveController != null); D.assert(this._overallMoveController.isCompleted); D.assert(this._resizeController == null); D.assert(this._sizePriorToCollapse == null); var slideToDismissDelegate = this.widget.slideToDismissDelegate; if (slideToDismissDelegate.resizeDuration == null) { this._handleDismiss(); } else { this._resizeController = new AnimationController(duration: slideToDismissDelegate.resizeDuration, vsync: this); this._resizeController.addListener(this._handleResizeProgressChanged); this._resizeController.addStatusListener(status => this.updateKeepAlive()); this._resizeController.forward(); this.setState(() => { this._renderingMode = CustomDismissibleMode.resize; this._sizePriorToCollapse = this.context.size; this._resizeAnimation = new FloatTween(1, 0).animate( new CurvedAnimation(this._resizeController, CustomDismissibleUtil.ResizeTimeCurve)); }); } }
void _handleDragUpdate(DragUpdateDetails details) { if (this.widget.controller != null && this.widget.controller.activeState != this) { return; } var delta = details.primaryDelta; if (delta != null) { this._dragExtent += (float)delta; } this.setState(() => { this._overallMoveController.setValue(this._dragExtent.abs() / this._overallDragAxisExtent); this._actionsMoveController.setValue(this._dragExtent.abs() / this._actionsDragAxisExtent); this._renderingMode = this._overallMoveController.value > this.totalActionsExtent ? CustomDismissibleMode.dismiss : CustomDismissibleMode.slide; }); }
public override Widget build(BuildContext context, int index, Animation <float> animation, CustomDismissibleMode mode) { return(this.actions[index]); }
public abstract Widget build(BuildContext context, int index, Animation <float> animation, CustomDismissibleMode mode);