浏览代码

fix cupertino sample

/zgh-devtools
xingweizhu 4 年前
当前提交
3afafe08
共有 1 个文件被更改,包括 6 次插入6 次删除
  1. 12
      com.unity.uiwidgets/Runtime/cupertino/sliding_segmented_control.cs

12
com.unity.uiwidgets/Runtime/cupertino/sliding_segmented_control.cs


public readonly Dictionary<T, AnimationController> _highlightControllers = new Dictionary<T, AnimationController>();
public readonly Tween<FontWeight> _highlightTween = new _FontWeightTween(begin: FontWeight.normal, end: FontWeight.w500);
public readonly Dictionary<T, AnimationController> _pressControllers = new Dictionary<T, AnimationController>();
public readonly Tween<float> _pressTween = new Tween<float>(begin: 1, end: 0.2f);
public readonly Tween<float> _pressTween = new FloatTween(begin: 1, end: 0.2f);
List<T> keys;

float separatorOpacity = 0f) {
D.assert(separatorOpacity != null);
D.assert(opacity != null);
separatorTween = new Tween<float>(begin: separatorOpacity, end: separatorOpacity);
opacityTween = new Tween<float>(begin: opacity, end: opacity);
separatorTween = new FloatTween(begin: separatorOpacity, end: separatorOpacity);
opacityTween = new FloatTween(begin: opacity, end: opacity);
}
float opacity;
Tween<float> opacityTween;

Tween<Rect> _currentThumbTween;
Tween<float> _thumbScaleTween = new Tween<float>(begin: CupertinoSlidingSegmentedControlsUtils._kMinThumbScale, end: 1);
Tween<float> _thumbScaleTween = new FloatTween(begin: CupertinoSlidingSegmentedControlsUtils._kMinThumbScale, end: 1);
float currentThumbScale = 1;

void _playThumbScaleAnimation(bool isExpanding = false) {
D.assert(isExpanding != null);
_thumbScaleTween = new Tween<float>(begin: currentThumbScale, end: isExpanding ? 1 : CupertinoSlidingSegmentedControlsUtils._kMinThumbScale);
_thumbScaleTween = new FloatTween(begin: currentThumbScale, end: isExpanding ? 1 : CupertinoSlidingSegmentedControlsUtils._kMinThumbScale);
state.thumbScaleController.animateWith(CupertinoSlidingSegmentedControlsUtils._kThumbSpringAnimationSimulation);
}

RenderBox child = children[i];
_ChildAnimationManifest manifest = _childAnimations[child];
D.assert(manifest != null);
manifest.separatorTween = new Tween<float>(
manifest.separatorTween = new FloatTween(
begin: manifest.separatorOpacity,
end: shouldFadeOut ? 0 : 1
);

正在加载...
取消
保存