initAnimations method

void initAnimations(
  1. covariant AssetPickerViewerState<Asset, Path> state
)

Initialize animations related to the zooming preview. 为缩放预览初始化动画

Implementation

void initAnimations(covariant AssetPickerViewerState<Asset, Path> state) {
  viewerState = state;
  doubleTapAnimationController = AnimationController(
    duration: const Duration(milliseconds: 200),
    vsync: state,
  );
  doubleTapCurveAnimation = CurvedAnimation(
    parent: doubleTapAnimationController,
    curve: Curves.easeInOut,
  );
}