flutter_mall_cart

指定起点、终点(左右均可)和widget A,将A以抛物线的形式从起点运动到终点(在同一水平线上的话,效果啥样我也不清楚了)。

the function is you can give a start and end point(on left or right its compatible,but not in a horzontal line),and provide a widget.ParabolaAnimateWidget will animate the widget that you provide, from start to end point follow a parabola path.

image

DEMO

demo is here: https://github.com/bladeofgod/throw_cart_demo

USAGE

看名字差不多就能知道意思,俺就不多写了,具体可以下载demo,里面更为清楚具体。

this a simple tool :), you can realize through this param's name; and clone this demo see more detail.

// rootkey传根部局的可以, 主要用于定位。 // rootkey is your rootWidget's key,it's help for location. // callback这个是动画的回调,会带会当前动画的status // callback is animation's status callback,

ParabolaAnimateWidget(rootKey,startOffset,endOffset,Icon(Icons.cancel,color: Colors.greenAccent,),callback,);

MORE

如果觉得有啥功能需要加上,可以告诉我,有时间我会加上去(具有通用性的) ,你也可以自己直接修改。

if you have some good thoughts about function, can tell me in there, i will add it soon(it's should be a common functional).

UPDATE

-0.06

bug fixed

-0.05

add control ratio . default value is 2

-0.04

change animation's duration time unit to millisecond

-0.0.3

fix bug

-0.0.2

resolve bug

-0.0.1

CORNER

Libraries

add_cart_parabola