Commit 8a20b261 authored by Dragoș Tiselice's avatar Dragoș Tiselice Committed by GitHub

Changed Material ease animations to fastOutSlowIn. (#5643)

Fixes #5393.
parent c57635f1
......@@ -122,7 +122,7 @@ class _PointDemoState extends State<_PointDemo> {
@override
void initState() {
super.initState();
_animation = new CurvedAnimation(parent: config.controller, curve: Curves.ease);
_animation = new CurvedAnimation(parent: config.controller, curve: Curves.fastOutSlowIn);
}
@override
......@@ -287,7 +287,7 @@ class _RectangleDemoState extends State<_RectangleDemo> {
@override
void initState() {
super.initState();
_animation = new CurvedAnimation(parent: config.controller, curve: Curves.ease);
_animation = new CurvedAnimation(parent: config.controller, curve: Curves.fastOutSlowIn);
}
@override
......
......@@ -24,8 +24,8 @@ class _ProgressIndicatorDemoState extends State<ProgressIndicatorDemo> {
_animation = new CurvedAnimation(
parent: _controller,
curve: new Interval(0.0, 0.9, curve: Curves.ease),
reverseCurve: Curves.ease
curve: new Interval(0.0, 0.9, curve: Curves.fastOutSlowIn),
reverseCurve: Curves.fastOutSlowIn
)..addStatusListener((AnimationStatus status) {
if (status == AnimationStatus.dismissed)
_controller.forward();
......
......@@ -281,7 +281,7 @@ class AppBar extends StatelessWidget {
final double toolBarOpacity = _toolBarOpacity(size.height, statusBarHeight);
if (toolBarOpacity != 1.0) {
final double opacity = const Interval(0.25, 1.0, curve: Curves.ease).transform(toolBarOpacity);
final double opacity = const Interval(0.25, 1.0, curve: Curves.fastOutSlowIn).transform(toolBarOpacity);
if (centerStyle?.color != null)
centerStyle = centerStyle.copyWith(color: centerStyle.color.withOpacity(opacity));
if (sideStyle?.color != null)
......@@ -357,7 +357,7 @@ class AppBar extends StatelessWidget {
appBar,
bottomOpacity == 1.0 ? bottom : new Opacity(
child: bottom,
opacity: const Interval(0.25, 1.0, curve: Curves.ease).transform(bottomOpacity)
opacity: const Interval(0.25, 1.0, curve: Curves.fastOutSlowIn).transform(bottomOpacity)
)
]
);
......
......@@ -693,7 +693,7 @@ class _SortArrowState extends State<_SortArrow> {
parent: _opacityController = new AnimationController(
duration: config.duration
),
curve: Curves.ease
curve: Curves.fastOutSlowIn
)
..addListener(_rebuild);
_opacityController.value = config.visible ? 1.0 : 0.0;
......
......@@ -94,7 +94,7 @@ class Input extends StatefulWidget {
}
const Duration _kTransitionDuration = const Duration(milliseconds: 200);
const Curve _kTransitionCurve = Curves.ease;
const Curve _kTransitionCurve = Curves.fastOutSlowIn;
class _InputState extends State<Input> {
GlobalKey<RawInputLineState> _rawInputLineKey = new GlobalKey<RawInputLineState>();
......
......@@ -264,7 +264,7 @@ class _MaterialState extends State<Material> {
}
if (config.type != MaterialType.transparency) {
contents = new AnimatedContainer(
curve: Curves.ease,
curve: Curves.fastOutSlowIn,
duration: kThemeChangeDuration,
decoration: new BoxDecoration(
borderRadius: kMaterialEdges[config.type],
......
......@@ -151,11 +151,11 @@ class _MergeableMaterialState extends State<MergeableMaterial> {
final CurvedAnimation startAnimation = new CurvedAnimation(
parent: controller,
curve: Curves.ease
curve: Curves.fastOutSlowIn
);
final CurvedAnimation endAnimation = new CurvedAnimation(
parent: controller,
curve: Curves.ease
curve: Curves.fastOutSlowIn
);
startAnimation.addListener(_handleTick);
......@@ -163,8 +163,7 @@ class _MergeableMaterialState extends State<MergeableMaterial> {
final CurvedAnimation gapAnimation = new CurvedAnimation(
parent: controller,
curve: Curves.ease,
reverseCurve: Curves.ease
curve: Curves.fastOutSlowIn
);
gapAnimation.addListener(_handleTick);
......
......@@ -106,7 +106,7 @@ class _ScrollbarState extends State<Scrollbar> {
@override
void initState() {
super.initState();
_opacity = new CurvedAnimation(parent: _fade, curve: Curves.ease);
_opacity = new CurvedAnimation(parent: _fade, curve: Curves.fastOutSlowIn);
}
@override
......
......@@ -213,7 +213,7 @@ class _RenderSlider extends RenderConstrainedBox implements SemanticActionHandle
_reactionController = new AnimationController(duration: kRadialReactionDuration);
_reaction = new CurvedAnimation(
parent: _reactionController,
curve: Curves.ease
curve: Curves.fastOutSlowIn
)..addListener(markNeedsPaint);
_position = new AnimationController(
value: value,
......@@ -229,7 +229,7 @@ class _RenderSlider extends RenderConstrainedBox implements SemanticActionHandle
return;
_value = newValue;
if (divisions != null)
_position.animateTo(newValue, curve: Curves.ease);
_position.animateTo(newValue, curve: Curves.fastOutSlowIn);
else
_position.value = newValue;
}
......
......@@ -1188,10 +1188,10 @@ class _TabBarViewState<T> extends PageableListState<TabBarView<T>> implements Ta
if (selectedIndex < previousSelectedIndex) {
_updateItemsFromChildren(selectedIndex, previousSelectedIndex);
scrollTo(new CurveTween(curve: Curves.ease.flipped).evaluate(new ReverseAnimation(animation)));
scrollTo(new CurveTween(curve: Curves.fastOutSlowIn.flipped).evaluate(new ReverseAnimation(animation)));
} else {
_updateItemsFromChildren(previousSelectedIndex, selectedIndex);
scrollTo(new CurveTween(curve: Curves.ease).evaluate(animation));
scrollTo(new CurveTween(curve: Curves.fastOutSlowIn).evaluate(animation));
}
}
......@@ -1296,7 +1296,7 @@ class TabPageSelector<T> extends StatelessWidget {
final Color color = Theme.of(context).accentColor;
final ColorTween selectedColor = new ColorTween(begin: Colors.transparent, end: color);
final ColorTween previousColor = new ColorTween(begin: color, end: Colors.transparent);
Animation<double> animation = new CurvedAnimation(parent: selection.animation, curve: Curves.ease);
Animation<double> animation = new CurvedAnimation(parent: selection.animation, curve: Curves.fastOutSlowIn);
return new AnimatedBuilder(
animation: animation,
builder: (BuildContext context, Widget child) {
......
......@@ -416,7 +416,7 @@ class _DialState extends State<_Dial> {
_thetaTween = new Tween<double>(begin: _getThetaForTime(config.selectedTime));
_theta = _thetaTween.animate(new CurvedAnimation(
parent: _thetaController,
curve: Curves.ease
curve: Curves.fastOutSlowIn
))..addListener(() => setState(() { }));
}
......
......@@ -54,7 +54,7 @@ abstract class RenderToggleable extends RenderConstrainedBox implements Semantic
_reactionController = new AnimationController(duration: kRadialReactionDuration);
_reaction = new CurvedAnimation(
parent: _reactionController,
curve: Curves.ease
curve: Curves.fastOutSlowIn
)..addListener(markNeedsPaint);
}
......
......@@ -138,7 +138,7 @@ class _TooltipState extends State<Tooltip> {
padding: config.padding,
animation: new CurvedAnimation(
parent: _controller,
curve: Curves.ease
curve: Curves.fastOutSlowIn
),
target: target,
verticalOffset: config.verticalOffset,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment