Skip to content

Commit cd31ad0

Browse files
committed
添加一些说明
1 parent 53204c9 commit cd31ad0

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,22 @@ A flutter interpolation plugin inspired by the React Native interpolation animat
1010
## Usage
1111
To use this plugin, add `animated_interpolation` as a [dependency in your pubspec.yaml file](https://flutter.io/platform-plugins/).
1212

13+
### InterpolationTween
14+
15+
16+
#### constructor
17+
18+
| Parameter |Required | Default | Description |
19+
| :------------ |:--------:|:---------------:| :-----|
20+
| inputRange | YES | NULL | Set the range of input,eg: ```[0,0.2,0.5,0.8,1]``` |
21+
| outputRange |YES| NULL | Set the range of input eg: ```[10,100,105,200,300]``` |
22+
| curve |NO| ```_Linear._()``` | Set the input/output animation curve |
23+
| extrapolate |NO| NULL | it will extrapolate the curve beyond the ranges given, but you can also have it clamp the output value |
24+
| extrapolateLeft |NO| ExtrapolateType.extend | It will extrapolate the curve beyond the given left range |
25+
| extrapolateRight |NO| ExtrapolateType.extend | It will extrapolate the curve beyond the given right range |
26+
27+
28+
1329
## Example
1430

1531
``` dart

README_zh-CN.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,20 @@
1010
## 使用
1111
要使用此插件包,请将animated_interpolation作为依赖项添加到您的`pubspec.yaml`文件中,详见[dependency in your pubspec.yaml file](https://flutter.io/platform-plugins/).
1212

13+
### InterpolationTween
14+
15+
16+
#### 构造器
17+
18+
| Parameter |Required | Default | Description |
19+
| :------------ |:--------:|:---------------:| :-----|
20+
| inputRange | YES | NULL | 设置输入的范围,eg: ```[0,0.2,0.5,0.8,1]``` |
21+
| outputRange |YES| NULL | 设置输入的范围 eg: ```[10,100,105,200,300]``` |
22+
| curve |NO| ```_Linear._()``` | 设置输入输出的动画曲线 |
23+
| extrapolate |NO| NULL | it will extrapolate the curve beyond the ranges given, but you can also have it clamp the output value |
24+
| extrapolateLeft |NO| ExtrapolateType.extend | It will extrapolate the curve beyond the given left range |
25+
| extrapolateRight |NO| ExtrapolateType.extend | It will extrapolate the curve beyond the given right range |
26+
1327
## 示例
1428

1529
``` dart

0 commit comments

Comments
 (0)