Update Fluro for change in SlideTransition behavior
This commit is contained in:
parent
3fa582a7e3
commit
5acbc2455b
|
@ -122,18 +122,21 @@ class Router {
|
||||||
if (transitionType == TransitionType.fadeIn) {
|
if (transitionType == TransitionType.fadeIn) {
|
||||||
return new FadeTransition(opacity: animation, child: child);
|
return new FadeTransition(opacity: animation, child: child);
|
||||||
} else {
|
} else {
|
||||||
FractionalOffset startOffset = FractionalOffset.bottomLeft;
|
const Offset topLeft = const Offset(0.0, 0.0);
|
||||||
FractionalOffset endOffset = FractionalOffset.topLeft;
|
const Offset topRight = const Offset(1.0, 0.0);
|
||||||
|
const Offset bottomLeft = const Offset(0.0, 1.0);
|
||||||
|
Offset startOffset = bottomLeft;
|
||||||
|
Offset endOffset = topLeft;
|
||||||
if (transitionType == TransitionType.inFromLeft) {
|
if (transitionType == TransitionType.inFromLeft) {
|
||||||
startOffset = new FractionalOffset(-1.0, 0.0);
|
startOffset = new FractionalOffset(-1.0, 0.0);
|
||||||
endOffset = FractionalOffset.topLeft;
|
endOffset = topLeft;
|
||||||
} else if (transitionType == TransitionType.inFromRight) {
|
} else if (transitionType == TransitionType.inFromRight) {
|
||||||
startOffset = FractionalOffset.topRight;
|
startOffset = topRight;
|
||||||
endOffset = FractionalOffset.topLeft;
|
endOffset = topLeft;
|
||||||
}
|
}
|
||||||
|
|
||||||
return new SlideTransition(
|
return new SlideTransition(
|
||||||
position: new FractionalOffsetTween(
|
position: new Tween<Offset>(
|
||||||
begin: startOffset,
|
begin: startOffset,
|
||||||
end: endOffset,
|
end: endOffset,
|
||||||
).animate(animation),
|
).animate(animation),
|
||||||
|
|
Loading…
Reference in New Issue