This file contains hidden or 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
| @override | |
| Widget build(BuildContext context) { | |
| return Scaffold( | |
| appBar: AppBar( | |
| title: Text('Example Animations'), | |
| ), | |
| body: Column( | |
| mainAxisAlignment: MainAxisAlignment.center, | |
| children: <Widget>[ | |
| firstChild(), |
This file contains hidden or 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
| @override | |
| Widget build(BuildContext context) { | |
| return Scaffold( | |
| appBar: AppBar( | |
| title: Text('Example Animations'), | |
| ), | |
| body: Column( | |
| mainAxisAlignment: MainAxisAlignment.center, | |
| children: <Widget>[ | |
| firstChild(), |
This file contains hidden or 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
| class HomeScreen extends StatefulWidget { | |
| @override | |
| _HomeScreenState createState() => _HomeScreenState(); | |
| } | |
| class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin { | |
| Animation _arrowAnimation, _heartAnimation; | |
| AnimationController _arrowAnimationController, _heartAnimationController; | |
This file contains hidden or 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
| Widget firstChild() { | |
| return Row( | |
| mainAxisAlignment: MainAxisAlignment.spaceAround, | |
| children: <Widget>[ | |
| AnimatedBuilder( | |
| animation: _arrowAnimationController, | |
| builder: (context, child) => Transform.rotate( | |
| angle: _arrowAnimation.value, | |
| child: Icon( | |
| Icons.expand_more, |
This file contains hidden or 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
| @override | |
| Widget build(BuildContext context) { | |
| return Scaffold( | |
| appBar: AppBar( | |
| title: Text('Example Animations'), | |
| ), | |
| body: Column( | |
| mainAxisAlignment: MainAxisAlignment.center, | |
| children: <Widget>[ | |
| firstChild(), |
This file contains hidden or 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
| class HomeScreen extends StatefulWidget { | |
| @override | |
| _HomeScreenState createState() => _HomeScreenState(); | |
| } | |
| class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin { | |
| Animation _arrowAnimation; | |
| AnimationController _arrowAnimationController; | |
This file contains hidden or 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
| AnimationController _animationController = | |
| AnimationController(vsync: this, duration: Duration(seconds: 1)); | |
| Animation _animation = Tween(begin: 0.0, end: -0.15).animate( | |
| CurvedAnimation(curve: Curves.ease, parent: _animationController)); |
This file contains hidden or 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
| Animation transformAnimation = BorderRadiusTween( | |
| begin: BorderRadius.circular(125.0), | |
| end: BorderRadius.circular(0.0).animate(type_of_animation); | |
| /////////////// OR /////////////// | |
| Animation transformAnimation = Tween<BorderRadius>( | |
| begin: BorderRadius.circular(125.0), | |
| end: BorderRadius.circular(0.0).animate(type_of_animation); |
This file contains hidden or 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
| Animation _animation = Tween(begin: 0.0, end: 1.0).animate(type_of_animation); |
This file contains hidden or 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
| class HomeScreen extends StatefulWidget { | |
| @override | |
| _HomeScreenState createState() => _HomeScreenState(); | |
| } | |
| class _HomeScreenState extends State<HomeScreen> | |
| with SingleTickerProviderStateMixin { | |
| AnimationController _animationController; | |