您最多选择25个主题 主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 
 
 

67 行
1.9 KiB

using Unity.UIWidgets.foundation;
using Unity.UIWidgets.ui;
namespace Unity.UIWidgets.animation {
public enum AnimationStatus {
dismissed,
forward,
reverse,
completed,
}
public delegate void AnimationStatusListener(AnimationStatus status);
public abstract class Animation<T> : ValueListenable<T> {
public abstract void addListener(VoidCallback listener);
public abstract void removeListener(VoidCallback listener);
public abstract void addStatusListener(AnimationStatusListener listener);
public abstract void removeStatusListener(AnimationStatusListener listener);
public abstract AnimationStatus status { get; }
public abstract T value { get; }
public bool isDismissed {
get { return status == AnimationStatus.dismissed; }
}
public bool isCompleted {
get { return status == AnimationStatus.completed; }
}
public Animation<U> drive<U>(Animatable<U> child) {
D.assert(this is Animation<float>);
return child.animate(this as Animation<float>);
}
public override string ToString() {
return $"{foundation_.describeIdentity(this)}({toStringDetails()})";
}
public virtual string toStringDetails() {
string icon = null;
switch (status) {
case AnimationStatus.forward:
icon = "\u25B6"; // >
break;
case AnimationStatus.reverse:
icon = "\u25C0"; // <
break;
case AnimationStatus.completed:
icon = "\u23ED"; // >>|
break;
case AnimationStatus.dismissed:
icon = "\u23EE"; // |<<
break;
}
D.assert(icon != null);
return icon;
}
}
}