|
|
|
|
|
|
Key key = null, |
|
|
|
Widget child = null, |
|
|
|
TimeSpan? duration = null, |
|
|
|
TimeSpan? reverseDuration = null, |
|
|
|
Curve switchInCurve = null, |
|
|
|
Curve switchOutCurve = null, |
|
|
|
AnimatedSwitcherTransitionBuilder transitionBuilder = null, |
|
|
|
|
|
|
this.layoutBuilder = layoutBuilder ?? defaultLayoutBuilder; |
|
|
|
this.child = child; |
|
|
|
this.duration = duration; |
|
|
|
this.reverseDuration = reverseDuration; |
|
|
|
|
|
|
|
public readonly TimeSpan? reverseDuration; |
|
|
|
|
|
|
|
public readonly Curve switchInCurve; |
|
|
|
|
|
|
|
|
|
|
children: children, |
|
|
|
alignment: Alignment.center |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
|
public override void debugFillProperties(DiagnosticPropertiesBuilder properties) { |
|
|
|
base.debugFillProperties(properties); |
|
|
|
properties.add(new IntProperty("duration", duration?.Milliseconds, unit: "ms")); |
|
|
|
properties.add(new IntProperty("reverseDuration", reverseDuration?.Milliseconds, unit: "ms", defaultValue: null)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
AnimationController controller = new AnimationController( |
|
|
|
duration: widget.duration, |
|
|
|
reverseDuration:widget.reverseDuration, |
|
|
|
vsync: this |
|
|
|
); |
|
|
|
Animation<float> animation = new CurvedAnimation( |
|
|
|