initStateAndTicker method
Call when viewer is calling initState
.
当预览器调用 initState
时注册 State 和 TickerProvider。
Implementation
void initStateAndTicker(
AssetPickerViewerState<Asset, Path> s,
TickerProvider v,
) {
viewerState = s;
vsync = v;
doubleTapAnimationController = AnimationController(
duration: const Duration(milliseconds: 200),
vsync: v,
);
doubleTapCurveAnimation = CurvedAnimation(
parent: doubleTapAnimationController,
curve: Curves.easeInOut,
);
}