Skip to content

Commit 22cf7b8

Browse files
committed
add SmartAnimatedWidget
1 parent 0fcedfb commit 22cf7b8

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,11 @@ To use this plugin, add `animated_interpolation` as a [dependency in your pubspe
4444
| duration |NO| Duration(seconds: 1) | Animation execution time |
4545
| autoPlay |NO| false | Whether to automatically animate |
4646

47+
#### method
4748

49+
| method | Description |
50+
| :------------ |:--------:|
51+
| animate | Execute the appropriate animation |
4852

4953

5054
## Example

README_zh-CN.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,26 @@
3232
| extrapolateLeft |NO| ExtrapolateType.extend | It will extrapolate the curve beyond the given left range |
3333
| extrapolateRight |NO| ExtrapolateType.extend | It will extrapolate the curve beyond the given right range |
3434

35+
36+
### SmartAnimatedWidget
37+
38+
#### constructor
39+
40+
| Parameter |Required | Default | Description |
41+
| :------------ |:--------:|:---------------:| :-----|
42+
| from | No | NULL | 类似于css3里keyframes中的from,eg: ```AnimatedConfig(opacity: 0)``` |
43+
| to |No| NULL | 类似于css3里keyframes中的to ,eg:```AnimatedConfig(opacity:1)```|
44+
| configMap |NO| NULL | 类似于Css3中的keyframes,eg:```{0:AnimatedConfig(opacity:0,translateX: 200),0.2:AnimatedConfig(opacity:1,translateX:100),1:AnimatedConfig(opacity:1,translateX:0)}``` |
45+
| curve |NO| ```_Linear._()``` | 输入输出曲线 |
46+
| duration |NO| Duration(seconds: 1) | 动画执行时间 |
47+
| autoPlay |NO| false | 动画是否自动执行 |
48+
49+
#### method
50+
51+
| method | Description |
52+
| :------------ |:--------:|
53+
| animate | 执行对应的动画 |
54+
3555
## 示例
3656

3757
``` dart

0 commit comments

Comments
 (0)