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
class EasingAnimationWidget extends StatefulWidget { | |
@override | |
EasingAnimationWidgetState createState() => EasingAnimationWidgetState(); | |
} | |
class EasingAnimationWidgetState extends State<EasingAnimationWidget> | |
with TickerProviderStateMixin { | |
AnimationController _controller; | |
Animation _animation; |
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
class EasingAnimationWidget extends StatefulWidget { | |
@override | |
EasingAnimationWidgetState createState() => EasingAnimationWidgetState(); | |
} | |
class EasingAnimationWidgetState extends State<EasingAnimationWidget> { | |
@override | |
Widget build(BuildContext context) { | |
//TODO: Add the layout here. |
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
void handler(status) { | |
if (status == AnimationStatus.completed) { | |
_animation.removeStatusListener(handler); | |
_controller.reset(); | |
_animation = Tween(begin: 0.0, end: 1.0).animate(CurvedAnimation( | |
parent: _controller, | |
curve: Curves.fastOutSlowIn, | |
))..addStatusListener((status){ | |
if (status == AnimationStatus.completed) { | |
Navigator.pop(context); |
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
//Stateful Widget created for this | |
@override | |
void initState() { | |
super.initState(); | |
_controller = | |
AnimationController(vsync: this, duration: Duration(seconds: 2)); | |
void handler(status) { |
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
class ParentingAnimationWidget extends StatefulWidget { | |
@override | |
ParentingAnimationWidgetState createState() => | |
ParentingAnimationWidgetState(); | |
} | |
class ParentingAnimationWidgetState extends State<ParentingAnimationWidget> | |
with TickerProviderStateMixin { | |
Animation growingAnimation; | |
Animation animation; |
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
@override | |
void initState() { | |
super.initState(); | |
_controller = AnimationController( | |
duration: const Duration(seconds: 2), vsync: this) | |
..addStatusListener((status) { | |
if (status == AnimationStatus.completed) { | |
Navigator.pop(context); | |
} |
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
@override | |
Widget build(BuildContext context) { | |
return AnimatedBuilder( | |
animation: _controller, | |
builder: (BuildContext context, Widget child) { | |
return Scaffold( | |
body: new Center( | |
child: new Stack( | |
children: <Widget>[ | |
new Center( |
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
class ValueChangeAnimationWidget extends StatefulWidget { | |
@override | |
ValueChangeAnimationWidgetState createState() => | |
ValueChangeAnimationWidgetState(); | |
} | |
class ValueChangeAnimationWidgetState | |
extends State<ValueChangeAnimationWidget> with TickerProviderStateMixin { | |
AnimationController controller; | |
Animation animation; |
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
import 'package:flutter_app/Movie.dart'; | |
import 'package:flutter_app/MovieList.dart'; | |
import 'package:test/test.dart'; | |
void main() { | |
MovieList movieList; | |
String jsonText = '{' + | |
'"page": 1,' + |
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
import 'dart:io'; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter_app/Movie.dart'; | |
import 'package:flutter_app/MovieDetail.dart'; | |
import 'package:flutter_test/flutter_test.dart'; | |
import 'MockImageHttpClient.dart'; | |
void main() { | |
// Mock object creation |
OlderNewer