AnimaWidget constructor

const AnimaWidget({
  1. Key? key,
  2. required Duration duration,
  3. required Widget onChildBuilder(
    1. BuildContext context,
    2. double value
    ),
  4. AnimationCtx? animationCtx,
  5. double from = 0.0,
  6. double to = 1.0,
  7. double? initValue,
  8. 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);