SlideTransition class

官方文档SlideTransition class

SlideTransition class

Animates the position of a widget relative to its normal position.

相对于控件的正常位置进行位置动画。

The translation is expressed as a Offset scaled to the child’s size. For example, an Offset with a dx of 0.25 will result in a horizontal translation of one quarter the width of the child.

这个转化用偏移量表示,偏移量与子控件大小成比例。例如,一个关于dx的偏移量为0.25,将导致一个子控件宽度四分之一的水平平移。

By default, the offsets are applied in the coordinate system of the canvas (so positive x offsets move the child towards the right). If a textDirection is provided, then the offsets are applied in the reading direction, so in right-to-left text, positive x offsets move towards the left, and in left-to-right text, positive x offsets move towards the right.

默认情况下,偏移量用的是画布的坐标体系(比如为正值偏移量,将导致子控件向右移动)。如果提供了textDirection则偏移量会按照读取方向运行,比如在从右往左的Text中,正值偏移量将导致往左移动,从左到右的Text中,正值偏移量将导致向右移动。

Here’s an illustration of the SlideTransition widget, with it’s position animated by a CurvedAnimation set to Curves.elasticIn:

See also:

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值