CLAnimationController class

封装的动画控制器 需要主类提供with SingleTickerProviderStateMixin

  • 使用方法
_animationController = CLAnimationController(vsync: this); // 创建动画控制器
...
_animationController.builder(
  startValue: 0,
  endValue: 100,
  child: Text('hello world'),
  builder: (context, child) {
    return Container(
      width: animation.value,
      height: animation.value,
      color: Colors.red,
      child: child,
    );
  },
); // 创建动画组件
...
_animationController.forward(); // 播放动画
...
_animationController.dispose(); // 释放动画控制器

Constructors

CLAnimationController({required TickerProvider vsync, Duration duration = const Duration(milliseconds: 300)})
创建一个CLAnimationController实例

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

build<T>({required T startValue, required T endValue, required TransitionBuilder builder, Widget? child}) Widget
构建动画Widget
dispose() → dynamic
释放资源
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited