Created
September 1, 2018 05:59
-
-
Save letsar/fe4f3d4b67fb1c3932d9de86a3a2b28b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SlidableDrawerDelegateAnimation({ | |
Key key, | |
this.controller, | |
}) : dxPositions = <Animation<Offset>>[ | |
Tween<Offset>( | |
begin: Offset(-1.0, 0.0), | |
end: Offset(1.0, 0.0), | |
).animate( | |
CurvedAnimation( | |
parent: controller, | |
curve: _kAnimInterval03, | |
), | |
), | |
Tween<Offset>( | |
begin: Offset(-1.0, 0.0), | |
end: Offset(0.0, 0.0), | |
).animate( | |
CurvedAnimation( | |
parent: controller, | |
curve: _kAnimInterval03, | |
), | |
), | |
Tween<Offset>( | |
begin: Offset(0.0, 0.0), | |
end: Offset(0.5, 0.0), | |
).animate( | |
CurvedAnimation( | |
parent: controller, | |
curve: _kAnimInterval03, | |
), | |
), | |
], | |
dyPositions1 = List.generate( | |
_kCount, | |
(i) => Tween<Offset>( | |
begin: Offset.zero, | |
end: Offset(0.0, -i.toDouble() / 2), | |
).animate( | |
CurvedAnimation( | |
parent: controller, | |
curve: _kAnimInterval01, | |
), | |
), | |
), | |
dyPositions2 = List.generate( | |
_kCount, | |
(i) => Tween<Offset>( | |
begin: Offset.zero, | |
end: Offset(0.0, i.toDouble() / 2), | |
).animate( | |
CurvedAnimation( | |
parent: controller, | |
curve: _kAnimInterval04, | |
), | |
), | |
), | |
skewTransform1 = Tween<double>(begin: 0.0, end: 0.5).animate( | |
CurvedAnimation( | |
parent: controller, | |
curve: _kAnimInterval02, | |
), | |
), | |
skewTransform2 = Tween<double>(begin: 0.0, end: -0.5).animate( | |
CurvedAnimation( | |
parent: controller, | |
curve: _kAnimInterval05, | |
), | |
), | |
super(key: key); | |
final Animation<double> controller; | |
final List<Animation<Offset>> dyPositions1; | |
final List<Animation<Offset>> dyPositions2; | |
final List<Animation<Offset>> dxPositions; | |
final Animation<double> skewTransform1; | |
final Animation<double> skewTransform2; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment