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