AnimaWidget constructor
const
AnimaWidget({
- Key? key,
- required Duration duration,
- required Widget onChildBuilder(
- BuildContext context,
- double value
- AnimationCtx? animationCtx,
- double from = 0.0,
- double to = 1.0,
- double? initValue,
- AnimationStatusListener? listener,
属性动画组件
duration 动画执行的时长
onChildBuilder 子组件创建器
animationCtx 动画控制器,用于控制动画
from 开始的属性值,默认为0
to 目标的属性值,默认为1
initValue 初始的属性值
listener 动画监听
Implementation
const AnimaWidget(
{Key? key,
required this.duration,
required this.onChildBuilder,
this.animationCtx,
this.from = 0.0,
this.to = 1.0,
double? initValue,
this.listener})
: initValue = initValue ?? from,
super(key: key);